Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Re: Re: The world is not object oriented

by hardburn (Abbot)
on Jan 02, 2004 at 16:34 UTC ( #318345=note: print w/ replies, xml ) Need Help??

in reply to Re: Re: The world is not object oriented
in thread The world is not object oriented

The inheritance tree is called that, because it is used for implementing inheritance, not polymorphism. Polymorphism means you have several things, that you can treat in a uniform way, for example because they all implement the same interface.

Subclasses, in general, have the same interface as their parents, which means that polymorphism and inheirtance are tightly bound.

I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

: () { :|:& };:

Note: All code is untested, unless otherwise stated

Comment on Re: Re: Re: The world is not object oriented
Download Code
Replies are listed 'Best First'.
Re: Re: Re: Re: The world is not object oriented
by chromatic (Archbishop) on Jan 02, 2004 at 17:30 UTC

    Yes and no. It's exceedingly difficult to have inheritance without polymorphism but it's exceedingly useful to have polymorphism without inheritance. Polymorphism is the principle. Inheritance is one application.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://318345]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2015-12-01 02:18 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (791 votes), past polls