Mixed feelings

Cees de Groot cg at cdegroot.com
Tue Jun 11 11:16:38 UTC 2002


Kamil Kukura <kamk at volny.cz> said:
>For example, Object understands so many methods that I doubt it still 
>stands for basic building stone. 

A comparison from biology: from dead material to the complexity of
bacterial DNA is a step that is many orders of magnitude larger than from
bacterial DNA to human DNA. 

We share a surprisingly high percentage of our genetic material with the
lowest lifeforms, so apparently specialization is possible with minute
amounts of additional information (I am acquainted to many classes
that only implement one method of the simplest sort: one that returns
a constant).

Even the simplest Object needs rich and complex behaviour in order to
really spring to life. A strength of Smalltalk is probably that even
the simplest Object instance is indeed a living thing, that knows a lot
about its environment: how to interact with debuggers and inspectors,
how to convert itself to various representations from text-based to
GUI, how to send itself over the network, etcetera. Another strength is
that this rich behaviour is categorized in multiple ways: protocols and
changesets in Squeak, which make sure that you don't lose oversight.

Contrast this with a randomly picked other OO language, say Java. Java
objects are definitely dead things. And by the time Java objects deeper
down the hierarchy are actually capable of interesting behaviour (for
some value of 'interesting'), all you have is a long list of methods in
your Javadoc with a lot of the names duplicated because of the static
type-based overloading.

>I like the syntax for passing arguments to message but then to have 
>message like #perform:with:with:with:? Would it be possible to extend 
>language so it could be written as something like #perform:*with:?
>
Probably. But toying around with reifications of messages is not something you
do daily, so usually it's not worth the trouble to extend the language for
stuff like this (besides, the simple solution would be #perform:withAll: which
accepts a collection for the second parameter).


-- 
Cees de Groot               http://www.cdegroot.com     <cg at cdegroot.com>
GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD  1986 F303 937F E098 9E8B



More information about the Squeak-dev mailing list