From: ohk@tfdt-o.nta.no (Ole-Hjalmar Kristensen FOU.TD/DELAB)
Subject: Re: Ada vs C++ (Ada 0X)
Date: 1997/09/10
Date: 1997-09-10T00:00:00+00:00 [thread overview]
Message-ID: <umqpvqh5rww.fsf@fabula4-atm.nta.no> (raw)
In-Reply-To: 34155698.4AE9@osc.edu
"James B. White, III (Trey)" <trey@osc.edu> writes:
>
>
> Brian Rogoff wrote:
> > 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?).
>
> Clear. More about this below.
>
> > 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.
>
> Finding code is easy. The trick is finding a decent Lisp compiler!
>
> > 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...
>
> If it's supported in the language, it is portable. Before anyone starts
> slamming the portability of C++ and templates, realize the situation has
> changed dramatically over the last few months.
>
Don't bet on that. We still have template classes which are legal C++,
but which in practice can only be compiled by CenterLine CC (and
probably other Cfront derivates), but not by g++, and not by Sun CC,
because of different strategies for instantiating the templates.
> > (In case anyone missed it, the C++ techniques being discussed can be found
> > at http://monet.uwaterloo.ca/blitz/ )
>
> I guess my real point is the following. Expression templates in C++
> demonstrate a level of functionality absent from Ada. If the Ada
> standard is updated again (Ada 0X?), perhaps the Ada community should
> consider ways of including the capabilities of expression templates (and
> template metaprograms) in the new standard. I certainly don't advocate
> supporting C++-style templates. What I would like to see is the
> *capabilities* of these techniques added to Ada, but with a better
> implementation.
> --
> James B. White, III (Trey)
> Ohio Supercomputer Center
> trey@osc.edu
> <http://www.osc.edu/~trey/>
> Phone: (614)292-9291 Fax: (614)292-7168
next prev parent reply other threads:[~1997-09-10 0:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <md5:DB04B9CCA20E8EB6142C50D2DE055239>
[not found] ` <34090462.4652@easystreet.com>
[not found] ` <Pine.SGI.3.95.970831115842.17664A-100000@shellx.best.com>
1997-09-02 0:00 ` Ada vs C++ James B. White, III (Trey)
1997-09-05 0:00 ` Robert Dewar
1997-09-05 0:00 ` Brian Rogoff
1997-09-05 0:00 ` Larry Kilgallen
1997-09-08 0:00 ` Ada vs C++ (Expression Templates) James B. White, III (Trey)
1997-09-08 0:00 ` Matthew Heaney
[not found] ` <Pine.SGI.3.95.970904201703.13590A-100000@shellx.best.com>
1997-09-05 0:00 ` Ada vs C++ Jon S Anthony
1997-09-08 0:00 ` Richard A. O'Keefe
1997-09-08 0:00 ` Ada vs C++ (vs Lisp) James B. White, III (Trey)
1997-09-08 0:00 ` Brian Rogoff
1997-09-09 0:00 ` Ada vs C++ (Ada 0X) James B. White, III (Trey)
1997-09-09 0:00 ` Brian Rogoff
1997-09-10 0:00 ` Ole-Hjalmar Kristensen FOU.TD/DELAB [this message]
1997-09-11 0:00 ` Anonymous
1997-09-11 0:00 ` Ole-Hjalmar Kristensen FOU.TD/DELAB
1997-09-09 0:00 ` Ada vs C++ (vs Lisp) Robert A Duff
1997-09-09 0:00 ` Ada vs C++ Joerg Rodemann
1997-09-09 0:00 ` Ada vs C++ (high-performance libraries) James B. White, III (Trey)
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox