Path: utzoo!attcan!uunet!mcsun!sunic!tut!tukki!sakkinen From: sakkinen@tukki.jyu.fi (Markku Sakkinen) Newsgroups: comp.object Subject: Re: Evaluating "Object-Oriented" Programming Languages Message-ID: <2669@tukki.jyu.fi> Date: 12 Jan 90 08:01:28 GMT References: <638@ajpo.sei.cmu.edu> <706@cui.unige.ch> <644@ajpo.sei.cmu.edu> <753@cui.unige.ch> <649@ajpo.sei.cmu.edu> Reply-To: sakkinen@jytko.jyu.fi (Markku Sakkinen) SAKKINEN@FINJYU.bitnet (alternative) Organization: University of Jyvaskyla, Finland Lines: 49 In article rmz@jamhog.uio.no (Bjoern Remseth) writes: > >> I too, would be interested in hearing from anyone with a different >> viewpoint, i.e., that Simula is somehow not "truly object-oriented." > >I can think of two things: > >First of all there are a number of fundamental things that are not >"true" classes, most notably all the numbers and texts. This >basically means that even if they are there, and have a clearly >defined protocol, a simula programmer can not make subclasses of them. Note: This criterion applies likewise to most (if not all) OOPL's that are extensions of conventional languages: Flavors, C++, Objective-C, CLOS, ... But I tend to agree that they are best regarded as "partially object-oriented". Question: However, isn't it actually bogus that all fundamental things in _Smalltalk_ are first-class objects? For instance, how do you define a use a meaningful subclass of SmallInteger, adding at least one instance variable? (This is not a rhetorical question: I have not used Smalltalk in practice and would be interested to see an example.) >Secondly it is possible to "INSPECT" any class instance. This means >that one can look into and modify the state of an object as if it was >a part of the local execution environment. Since identifiers local to >the inspected object are used without any form of prefix it is not >possible only by looking at a statement inside the inspect statement >to see if it sends a message to an object or not. > [example deleted] True, although in current Simula this can somehow be prevented by 'protected' (and 'hidden') declarations. Only in very few languages is the encapsulation of objects as tight as in Smalltalk. One can argue whether exactly the Smalltalk model is the only right one: there are good reasons for taking as the unit of encapsulation, either the object (as in Smalltalk) or the class (as in most other class-based languages). As compared at least to C-based OOPL's, Simula has the advantage that any protections established on the O-O level cannot be simply circumvented on the lower level. Markku Sakkinen Department of Computer Science University of Jyvaskyla (a's with umlauts) Seminaarinkatu 15 SF-40100 Jyvaskyla (umlauts again) Finland