Re: Clean Object Class Design -- Circle/Ellipse

From: James A. Robertson <jarober_at_mail.com>
Date: Thu, 18 Oct 2001 14:00:00 GMT
Message-ID: <3BCEE141.2030007_at_mail.com>


Sketch out for me the Smalltalk code that illustrates the 'problem'

Bob Badour wrote:

> Graham Perkins <gperkins_at_dmu.ac.uk> wrote in message news:<3BC56D0A.BC80A70A_at_dmu.ac.uk>...
>

>>Bob Badour wrote:
>>
>>>..
>>>If Smalltalk made sufficient distinction between values and variables
>>>
>>It makes perfect such distinction.
>>

>
> I disagree, and I have explained exactly how it makes insufficient
> distinction.
>
>
>
>>>one would not need to override setFoci in the Circle class because it
>>>would never inherit the method. Circle values would inherit the
>>>operations on Ellipse values but Circle variables would not inherit
>>>the operations on Ellipse variables.
>>>
>>Oh you really are confused.  I can see where now, but not
>>sure if I can explain it.
>>

>
> If you were correct instead of confused yourself, you would have no
> doubt of your ability to explain it. As I observed earlier, I believe
> Smalltalk is the programming language equivalent of Newspeak.
> Smalltalk programmers seem to lose the ability to conceive or to
> communicate programming fundamentals.
>
>
>
>>However, the solution which would remove your problem would be
>>to clearly distinguish between mutable and immutable objects.
>>

>
> In other words, programmers must resort to ad hoc idioms and patterns
> because Smalltalk makes inadequate distinction between values and
> variables.
>
>
>
>>It's a matter of how you design the classes, and absolutely nothing
>>to do with any particular issues of variables and values in Smalltalk
>>or any other language.
>>

>
> I disagree. It's a matter of how well the language reflects reality
> and of how well the language supports the type modeller in his or her
> task.
>
Received on Thu Oct 18 2001 - 16:00:00 CEST

Original text of this message