[E-Lang] Re: inheritance, delegation, mental models for beginners (was: down with `define' (was: newbie syntax: picayune points from a prejudiced programmer))

Felix A. Croes felix@dworkin.nl
Sat, 3 Mar 2001 01:37:26 +0100 (CET)


zooko@zooko.com wrote:

>[...]
> By the way, there may be an "out" on the subject of inheritance.  The
> MUD programming languages [1] descended from `lpC' use the word
> "inheritance" to mean the thing that we call "delegation".  I would
> consider it valid to provide a delegation mechanism in E and call it
> "inheritance".  Since E is dynamically typed there is no really
> important difference, is there? [2]

Some comments:

The language (in various dialects) is called "LPC".  The variant that
may be most familiar to people not associated with MUDs has a different
name: Pike <http://pike.roxen.com/>.

Inheritance in LPC is definitely not delegation.  However, delegation
is used in some LPC variants for a single special object, which can
provide default functionality for all other objects in the system.

These same LPC variants also provide a different form of delegation,
in which the methods of the delegated-to object actually override those
of the original.

Within the context of LPC, I consider neither type of delegation an
asset, and they are not included in my own LPC dialect,
<http://www.dworkin.nl/dgd/>.

Regards,
Felix Croes / Dworkin