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,df854b5838c3e14 X-Google-Attributes: gid103376,public From: Ray Toal Subject: Re: C/C++ knocks the .... Date: 1996/02/20 Message-ID: <4gc1st$6qj@ux1.lmu.edu>#1/1 X-Deja-AN: 140240954 references: <4g2r2r$ded@stc06.ctd.ornl.gov> content-type: text/plain; charset=us-ascii organization: Loyola Marymount University mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 1.1 (Windows; U; 16bit) Date: 1996-02-20T00:00:00+00:00 List-Id: jsa@organon.com (Jon S Anthony) wrote: >In article stt@henning.camb.inmet.com (Tucker Taft) writes: > >> Matt Kennel (kennel@msr.epm.ornl.gov) wrote: >> : ... >> : >> : Eiffel intentionally makes the unit of namespace and of type >> : the same. >> >> : The question is, do the benefits of having them completely separate >> : make up for the extra work and complexity of having to double the >> : number of 'mental units' in most idiomatic programs. (and without >> : MI you have to go a bit further) >> >> : Yes, Ada has them on orthogonal axes. Eiffel only has "one axis" >> : but it may empirically be along the major princpal component with >> : only a small deviation in other directions. >> >> On the other hand, various Eiffel implementations have felt the >> need to add yet another language on top for doing "configuration" >> of large systems (I think it is called "GRACE"?). This seems >> to indicate that programmers have a need to deal with larger groupings >> than that represented by a single class. Although one could conceivably >> just create larger and larger classes, at some point the model of a "type" >> breaks down, whereas the notion of a package scales nicely to the >> notion of a subsystem, as in Ada 95. > >You are thinking of "Lace" (Language for Assembling Classes in Eiffel). >It is not part of the Eiffel language, but is a suggested component of >any Eiffel environment. See ETL by Meyer. > >My own belief on this issue is that the approach adopted by STT in Ada95 >is _by far_ the better of the two. In fact, I would now consider it one >of the primary advantages of Ada over things like Eiffel, Sather, SmallTalk, >(and C++, though it has many other serious problems). Coupled with the >notion of an extensible heirarchical library, it is definitely one of the >very best type/component structuring constructs available in any current >programming language. Let's also add that the addition of namespaces to C++ looks suprisingly like another "level" of packaging: Various C++ classes and associated objects, operations, and exceptions can now all be nicely packaged (good term, by the way) into a namespace. That the C++ designers saw the inherent need to build such a packaging facility into the language itself, rather than leaving it to environment, must have been an infuence of Ada's (though I'm not sure). It's a fact that large-scale software projects require *subsystems* and languages that can express them naturally (such as by hierarchical libraries in Ada, as Jon pointed out) are desired. While C++ subsystems can be nicely structured using namespaces, there are two (possibly minor) language design aspects worthy of note: 1. Namespaces are open and can be nested, so as usual we have another C++ feature that is so flexible the possibilities for misuse are many (though they should not appear in disciplined programmers' code) 2. Had C++ had namespaces BEFORE classes, there would not have been the need for both prefix and postfix operations. At least Smalltalk is ALL POSTFIX and Ada is ALL PREFIX. The Ada 95 designers are to commended for resisting the urge to introduce postfix message passing syntax, which I have heard some people wish they had. Having both prefix and postfix is really annoying to read - is the distinction between member function and global function really that big of a deal to make syntactically? I think not. Sorry I seemed to go off topic.... Ray Toal