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 X-Google-Thread: 103376,6b6619eb9cada212 X-Google-Attributes: gid103376,public From: Brian Rogoff Subject: Re: Help me to chose between ADA 95 and C++ Date: 1999/12/13 Message-ID: #1/1 X-Deja-AN: 560315678 Content-Transfer-Encoding: QUOTED-PRINTABLE References: <01bf37fb$a91afb60$0564a8c0@IS-D2D04C.test> <829rbv$a8m$1@nntp6.atl.mindspring.net> <01bf3e32$0b9dc880$022a6282@dieppe> <385112AE.7E2CFA9@rdel.co.uk> Content-Type: TEXT/PLAIN; charset=X-UNKNOWN X-Trace: nntp1.ba.best.com 945130519 205 bpr@206.184.139.136 MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-12-13T00:00:00+00:00 List-Id: On Fri, 10 Dec 1999, Chris Powell wrote: > Pascal Obry wrote: > > Richard D Riehle a =E9crit dans l'article > > <829rbv$a8m$1@nntp6.atl.mindspring.net>... > > > Smalltalk is certainly a nicely designed language. However, > > > if one is serious about object-oriented programming, > > > Ada is an excellent choice. The only appropriate alternative > > > to Ada, for serious OOP, is probably Eiffel. > >=20 > > I second that. For me the 2 bests designed languages for serious > > (read industrial) OO development are Ada and Eiffel. > >=20 > > Pascal. >=20 > I would not recommend Ada 95 for OO development. Okay, it has all the > benefits of Ada 83 for type safety, etc, but the syntax of its class > programming constructs seems to make the code long winded, obscure and > error prone. I can give examples if anyone is interested/disagrees. Yes, examples please.=20 > I suppose C++ is a swear word in this newsgroup, but I prefer it, even > though I preferred Ada 83 to C. C++ is more type safe than C, the > Standard Template Library (if used) can protect from memory leaks, array > bounds checking, etc; the sorts of problems that made C unsuitable for > 'industrial strength' development. (Ironically, C has been used for lots > of very serious software, though). Prefer C++ in general, for "OO" development, what? C++ certainly has a few= =20 things I like that Ada doesn't, and while everything you say is true, its not enough for me. While C++ offers greater type safety than C, it offers its own loopholes as well as most of the C ones. I still prefer Ada, which is far safer.=20 The STL is cool, and you can certainly do a variant in Ada. The Ada version loses some of the readability of the C++ version IMO due to=20 all of the instantiations but really gains in other ways since you can=20 express typing information directly in the generic. Another powerful feature of Ada generics is the ability to pass subprogram arguments; when= =20 combined with subprogram nesting the Ada STL has more useful functional=20 programming capability than the C++ one.=20 Of course, none of this is really OO, but I think OO is way overrated anywa= ys. Since you mention STL in the same paragraph as OO, I suppose I should ask you what you mean by OO. Most people wouldn't consider the STL OO, including its authors.=20 I suppose I could be convinced that C++ is more convenient for a "pure OO"= =20 style of programming than Ada. Let's see those examples... -- Brian