From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2ea02452876a15e1 X-Google-Attributes: gid103376,public From: spencer@ERA.COM (Spencer Allain) Subject: Re: Real OO (was Choice of OO primitives in Ada95) Date: 1996/02/22 Message-ID: #1/1 X-Deja-AN: 140581148 sender: news@ERA.COM references: <199602221711.SAA18350@email.enst.fr> organization: Engineering Research Associates, Vienna, VA newsgroups: comp.lang.ada Date: 1996-02-22T00:00:00+00:00 List-Id: In article <199602221711.SAA18350@email.enst.fr> Jean-Pierre Rosen writes: >In order to acheive those goals optimally, an OO language should offer: > >1) encapsulated abstractions (classes) OK, but of course you mean that there must be a clear separation, at language level, between specification and implementation >Taking each in turn (and not attempting to justify them), > >1) Best provided by pure OO (eg. Eiffel, Smalltalk) followed by hybrid OO > language with proper classes (extendable types mapped onto modules) > eg. (C++, myriad others) followed by hybrid OO with non-encapsulated classes > (eg. Ada, CLOS?). Of course, I do not agree. For example, the presence of ONCE functions in Eiffel is a kludge to overcome the absence of package initialization that is nicely provided by Ada. And as for separating specs and implementations, Ada is the only language that does it nicely, without giving up safety. Uhhh... since when has "encapsulated abstractions" been defined as limited to classes? "Classes" are a way to encapsulate all the operations that are associated with an object type. "Interfaces" (where classes are really a more restricted form of these) encapsulate all the operations that are associated with the types visible to that specification -- there isn't the single type restriction. I also obviously do not agree with the explanation for (1), but I also have to disagree with the statement that Ada is the only language that separates specifications from their implementations, in a nice and safe manner. Modula-3 has a similar interface/implementation separation, which is just as nice and equally as safe. (It actually resolves other safety issues not related to pure OO programming, but that isn't what is being discussed here) I think Ada has a powerful encapsulation system, but it is not the only language with one. -Spencer ---------------------------------------------------------------------- Spencer Allain E-mail: spencer@era.com Engineering Research Associates Phone : (703) 734-8800 x1414 1595 Spring Hill Road Fax : (703) 827-9411 Vienna, VA 22182-2235 Ask me why _NOT_ to buy anything from Royal Prestige, a Hycite Co. ---------------------------------------------------------------------- Modula-3 Home Page DEC SRC Modula-3 FAQ, etc. ----------------------------------------------------------------------