Re: Clean Object Class Design -- Circle/Ellipse

From: James A. Robertson <jarober_at_mail.com>
Date: Sat, 01 Sep 2001 04:42:43 GMT
Message-ID: <3B906770.E1C0185E_at_mail.com>


Bob Badour wrote:
>
> James A. Robertson wrote in message <3B8A6798.A8F25218_at_mail.com>...

> >> >1) Smalltalk is a crappy language
> >>
> >> Actually, I said it is just as crappy as C++, which does not say it is
> >> crappy.
> >>
> >
> >Can you list your specific complaints?
>
> We can start by observing that Smalltalk, like C++, makes insufficient
> distinction between values and variables.
>

hmm - C++ variables and Smalltalk variables are entirely different, leading me to wonder how well you know Smalltalk. In C++, one declares a variable as a type, thus determining the specific storage type to be used by that variable. In Smalltalk, variables are not declared as being of a specific type - they are references to arbitrary objects. In Smalltalk, a variable doesn't have to reference any particular kind of object.

> Perhaps, Richard would like to list his specific complaints that are
> pertinent to the discussion at hand? Or would you like to offer one or more?
>
> >> >2) Instances are not values.
> >> >
> >> >Since Smalltalk *has* instances that are values (the number
> >> >5 comes mind),
> >>

Generally (In VisualWorks, most others are roughly similar), a variable references an object. In fact, it refs an object header, which in turn refs the actual object. There are exceptions; one can have 'immediate' objects, where the header actually holds the object (SmallInteger objects, for instance).
For the developer, this doesn't actually matter. In fact, if you think it matters, then you are paying way too much attention to detail.

-- 
James A. Robertson
Product Manager (Smalltalk), Cincom
jarober_at_mail.com
<Talk Small and Carry a Big Class Library>
Received on Sat Sep 01 2001 - 06:42:43 CEST

Original text of this message