[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: s-exprs + prototypes



Michael St. Hippolyte wrote:
> > Correct me if I'm wrong, but assuming a dynamically-typed
> > language that's capable of polymorphically dispatching
> > messages on objects whose type isn't known in advance,
> > there's no way the dispatch mechanism can be as trivial as
> > it is for nested closures, where polymorphism is not an issue
> > and directly indexed access can be used.
>
> It's not polymorphism that inflicts the main cost, it's late binding.

True, but in a dynamically-typed OO language, polymorphism is the "proximate
cause" of that cost - without polymorphism, you wouldn't need late binding.

>From another message:

> But the most important simplification in the FOOP paradigm is the idea
> that atomic functions and objects are the same thing.  There are several
> consequences of this, all of which tend towards simplification:
>
>     -- first-class functions (only one namespace for functions
> and objects)
>
>     -- "return type" and "supertype" are the same thing
>
>     -- objects inherit function definitions rather than state
>
>     -- objects encapsulate functions, not data, so type binding and
>        inheritance can occur lazily (as explained above)

You had me at "first-class functions".  :)  It sounds very interesting.

Anton