| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Clean Object Class Design -- Circle/Ellipse
Using a real example, show me how any of your points matter in Smalltalk.
Bob Badour wrote:
> brangdon_at_cix.co.uk (Dave Harris) wrote in message news:<memo.20011001000009.35593A_at_brangdon.madasafish.com>...
>
>>bbadour_at_golden.net (Bob Badour) wrote (abridged): >> >>>Ask him to point to any Smalltalk language definition that defines >>>"instance" as anything other than a variable which one can reference. >>> >>The 1997 draft of the ANSI Smalltalk standard (which is the version of the >>standard I have to hand), says: >> >> A /variable/ is a computational entity that stores a single >> reference (the /value/ of the variable) to an object. >> >> [...] An /object/ is a computational entity which is capable of >> responding to a well defined set of messages. An object may >> also encapsulate some (possibly mutable) state. >> >>This is *not* saying an object is a variable. >>
>>(The ANSI standard does not define "instance". It uses "object" instead. >>Later it says that when an object does have state, it represents it with >>special kind of variables called "instance variables". In other words, an >>object is not a variable but an object can contain variables.) >>
>>>An instance or variable can have the value 5. The value, however, is >>>not an instance. >>> >>So sorry, but in Smalltalk the value 5 is an instance of the class >>SmallInteger. >>
>>> One cannot reference a value. Values are self-identifying. >>> >>Indeed 5 is self-identifying. We can send a message to the value 5 whether >>or not we have a variable referring to it. >>
>>>According to the definition of the Smalltalk language an instance is a >>>variable that one can reference. >>> >>Again, so sorry, but my reading of the ANSI definition of Smalltalk says >>that an instance (or object) is something which responds to messages. >>
>>Perhaps you are talking about some other language, also called Smalltalk? >>
>>How confusing! Can you point me to a definition of your language? >>
>>Definitions of ANSI Smalltalk are available from: >> http://minnow.cc.gatech.edu/squeak/172 >> >> Dave Harris, Nottingham, UK | "Weave a circle round him thrice, >> brangdon_at_cix.co.uk | And close your eyes with holy dread, >> | For he on honey dew hath fed >> http://www.bhresearch.co.uk/ | And drunk the milk of Paradise." >>Received on Sat Oct 06 2001 - 23:42:47 CDT
![]() |
![]() |