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: 103376,b87849933931bc93 X-Google-Attributes: gid103376,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: 114809,b87849933931bc93 X-Google-Attributes: gid114809,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: OO, C++, and something much better! Date: 1997/01/07 Message-ID: #1/1 X-Deja-AN: 208313385 references: <32CCE4ED.6A21@online.no> <5ajo99$khu@panix.com> <32ce7009.280817694@news.zip.com.au> <32D0CA27.44C2@ghgcorp.com> <32D245D5.2C0@ghgcorp.com> organization: New York University newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object,comp.software-eng Date: 1997-01-07T00:00:00+00:00 List-Id: Ole-Hjalmar Kristensen FOU.TD/DELAB wrote: > 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? Actually, when I talked to Alex, he indicated that there were critical features in Ada 95 that were missing in C and C++ for this kind of work. In particular, he noted that C lacks a general address comparison operation, useful for hashing data structures, whereas Ada does have such an operation (in System.Storage_Elements on type Integer_Address). It is a bit ironic to identify this particular feature as crucial (since most people mistakenly think that C has such a feature and Ada doesn't!) He did also discuss problems in Ada 95, most notably the fact that generics are less flexible than templates (that is to be expected, the flexibility of templates comes of course at the expense of compile time checkability), and also the lack of automatic instantiation in Ada. Automatic instantiation is of course a dangerous tool, but in the hands of those writing libraries of this type (Alex said to me that he thought there were only about six people who should be writing such libraries and he did not know who the other five were :-) :-) dangerous tools can be put to good use, with the danger being insulated from the eventual client at least in some cases. There is a team at Rensaleer which has been working on duplicating STL in Ada 95. The preliminary results looked very encouraging, I do not know the status of this work.