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: fac41,b87849933931bc93 X-Google-Attributes: gidfac41,public X-Google-Thread: 109fba,b87849933931bc93 X-Google-Attributes: gid109fba,public X-Google-Thread: 1108a1,b87849933931bc93 X-Google-Attributes: gid1108a1,public X-Google-Thread: f43e6,b87849933931bc93 X-Google-Attributes: gidf43e6,public X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public X-Google-Thread: 114809,b87849933931bc93 X-Google-Attributes: gid114809,public From: ohk@ultra.tfdt-o.nta.no (Ole-Hjalmar Kristensen FOU.TD/DELAB) Subject: Re: OO, C++, and something much better! Date: 1997/01/06 Message-ID: #1/1 X-Deja-AN: 208045521 references: organization: Telenor Online Public Access newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object,comp.software-eng Date: 1997-01-06T00:00:00+00:00 List-Id: In article <32D0CA27.44C2@ghgcorp.com> Stanley Allen writes: John (Max) Skaller wrote: > Is C++ innovative? Too right it is. > It has the most powerful support for genericity available > in any widely used commercial language. (Sorry, Ada doesn't count, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ You loaded the question, and therefore your dismissal of Ada is the act of knocking down a strawman. Let me engage in some debuking here, and point out that Ada *is* widely used, just not in the PC/GUI world. Ada is also very much a "commercial" language; in fact, many of the companies using Ada today for commercial projects consider it to be a success factor in their software efforts. To hear that C++'s template mechanism is "innovative" and "powerful" comes as a surprise. Parts of the C++ template mechanism look like a borrowing of Ada's "generic" facility (Stroustrup attributes this to Alex Stepanov, who had done a great deal of work with Ada generics before designing the C++ Standard Template Library). Unfortunately, the type system in C++ is too weak to support anything as powerful as Ada's generic facility. The C++ "template argument" (which corresponds to Ada's "generic formal parameter") for a type can only be of the form "class T". In Ada terms, this would be like having all generic formals be "type T is private". -- Stanley Allen mailto:sallen@hso.link.com I would tend to agree. Another point is that C++ templates tend to be implemented differently in every compiler, so a program which uses templates heavily is often less portable. However, if I remember correctly, Alex Stepanov had earlier tried to implement a library like the C++ STL in Ada, but was incapable of doing it. This would indicate that the C++ template mechanism is more flexible than the Ada generics. Any comments?