ALU capability (was Re: [E-Lang] Authority -- what is its dual?)
Peter Van Roy
pvr@info.ucl.ac.be
Fri, 19 Oct 2001 09:14:54 +0200
> At 09:40 AM 10/18/01 -0400, Jonathan A Rees wrote:
>
> >...
> >cons cells) are un-invokable. Part of what's meant by the oo mantra
> > "everything is an object" is that everything is invokable, and (ideally)
> > that the semantics of anything is only the semantics of invoking it. A
> > thing has no properties other than the behavior elicited by
> > invocation. (To
> > my knowledge, only some Actors language and Joule achieve this ideal.
> > Smalltalk and E do not.)
>
> Just for clarification, Smalltalk does take the "everything is an object"
> perspective, even if it does not completely follow through on it.
As I remember it, Smalltalk has lexically-scoped closures, "blocks", which
are used to define control abstractions. Blocks are not objects, which is
exactly as it should be, IMHO. The problem with the 'everything is an
object' philosophy is that there are two approaches lurking:
1. Everything has uniform object syntax --> bad idea! It just pushes the
language's richness into the class & object names, an extra layer of
syntax that is cumbersome.
2. Everything is an abstract data type (well-defined set of values +
operations)
--> much better.
As I understand Smalltalk, it follows (2) which is the right way to go, as
far as I can tell.
(Another issue is whether all ADTs should be potentially definable with
inheritance. That's another can of worms!)
Peter