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,e28ffe0eaf31d1b6 X-Google-Attributes: gid103376,public From: Brian Rogoff Subject: Re: Ada vs C++ (vs Lisp) Date: 1997/09/08 Message-ID: #1/1 X-Deja-AN: 270872918 References: <34090462.4652@easystreet.com> <340C47F8.670B@osc.edu> <5v0lba$jnv$1@goanna.cs.rmit.edu.au> <341404B4.13CB@osc.edu> Newsgroups: comp.lang.ada Date: 1997-09-08T00:00:00+00:00 List-Id: On Mon, 8 Sep 1997, James B. White, III (Trey) wrote: > Richard A. O'Keefe wrote: > > "James B. White, III (Trey)" writes: > > >Ada may have advantages over C++, but only C++ allows these incredibly > > >powerful programming techniques. > > > > False. Lisp people know this kind of meta-programming as a very old > > technique indeed. > > Let me clarify my statement. The combination of expression templates > *and* operator overloading *and* function inlining *and* efficient > compilers allows the creation of elegant interfaces that result in code > that rivals optimized hand-coded FORTRAN in performance. As far as I > know, this is true only of C++. If it is true of Lisp or anything else > (like Ada), I'd like to know! I think it is obvious that you can't do this stuff with Ada generics because Ada generic instantiation is not primitive recursive function calculation (what a mouthful, was that clear?). Lisp macros can do arbitrary computation during expansion, so given a decent Lisp compiler you should be able to get the same effect. Ask nicely on the Lisp newsgroup and I bet you'll even get code. My question is whether it is necessary for your purposes to have this capability directly supported in the language, or if some source to source transformation tool would suffice; i.e., an Ada aware macro system or some other such tool. I recall reading about such a macro system (M5?) but I forget where... (In case anyone missed it, the C++ techniques being discussed can be found at http://monet.uwaterloo.ca/blitz/ ) -- Brian