home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.smalltalk
- Path: sparky!uunet!news.univie.ac.at!scsing.switch.ch!univ-lyon1.fr!ghost.dsi.unimi.it!rpi!uwm.edu!spool.mu.edu!yale.edu!ira.uka.de!Germany.EU.net!donald!hasko
- From: hasko@heeg.de (Hasko Heinecke)
- Subject: Re: get/set behaviour (was: >>Voluntary method typing)
- Message-ID: <1993Jan27.132905.3865@heeg.de>
- Organization: Georg Heeg Objektorientierte Systeme, Dortmund, FRG
- References: <1993Jan27.001832.10017@cs.uow.edu.au>
- Date: Wed, 27 Jan 1993 13:29:05 GMT
- Lines: 49
-
- In article <1993Jan27.001832.10017@cs.uow.edu.au> humm@cs.uow.edu.au (Bernhard G Humm) writes:
- >
- >hasko@heeg.de writes:
- >
- >In article <1993Jan25.070651.2105@cs.uow.edu.au> humm@cs.uow.edu.au (Bernhard G >Humm) writes:
- >>>>>Of course, this only applies to database-type objects which just have
- >>>>>get/set behaviour, but this seems quite a significant subset.
- >>>
- >>>Are there really any other cases in a pure OO language?
- >>
- >>Are there really _such_ cases in a pure OO project?
- >
- >In Smalltalk, objects have named or indexed instance variables. They can be
- > assigned references to other objects and the values of those variables
- > represent the internal state of the object (only simple types like numbers
- > or characters don't have instance variables and still have values; probably
- > they had better been separated from objects like e.g. in Eiffel). The only
- > way you can change the internal state of an object is assigning another value
- > to one of its variables. Reading the value of such a variable gives you the
- > reference to another object which allows you to do the same things (assign
- > variables or read them). Now you tell me the difference between ``database-type
- > objects'' and Smalltalk objects...
-
- I didn't talk about Smalltalk in particular (but then, I was... :-) ). Anyway,
- in an object-oriented way of thinking, you don't speak of modifying instance
- variables but of modifying states. Wether those states are implemented using
- one or more of no instance variables at all is a design issue, and in a
- perfect world you wouldn't know even the names of the instance variables. Why
- bother? That's what member functions/messages are for.
-
- The problem is: I can't quite explain the difference between database-type
- objects and Smalltalk objects. Maybe, it's just that the words "database-type
- objects" imply a certain notion of objects that I don't share, not a real
- technical difference. Maybe, it's that we prefer different analysis methods.
- Maybe, you are talking about implementation, and I'm talking about analysis
- or design. I don't know. All I know is that I don't like the word "database
- type objects." N. Wirth said in one lecture about Oberon, object-orientation
- is just hierarchical records and procedure variables. In a way, he is right,
- but then, he's not. :-)
-
- Hasko
-
-
-
- --
- +-------------------------------------------------------+
- | Hasko Heinecke @ Georg Heeg Objektorientierte Systeme |
- | I _never_ mean what I say - and nobody else does... |
- +-------------------------------------------------------+
-