From: Stephen Leake <Stephen.A.Leake@nasa.gov>
Subject: Re: [ANN] an EBNF parser and coding pattern tool (LGPL)
Date: 12 Feb 2003 14:39:08 -0500
Date: 2003-02-12T19:52:11+00:00 [thread overview]
Message-ID: <uptpxe1b7.fsf@nasa.gov> (raw)
In-Reply-To: 1045074177.729142@master.nyc.kbcfp.com
Hyman Rosen <hyrosen@mail.com> writes:
> When things are known at compile time, they can be generated
> at compile time. You need to read up on what's being done in
> the world of C++ templates. Here's a cursory synopsis:
>
> struct Nil { };
>
> template <typename T1, typename T2>
> struct TList
> {
> typedef T1 first;
> typedef T2 rest;
> };
>
> Now, given an arbitrary class, like
>
> struct A { int a; double c; char *p; };
>
> I could reasonably ask the compiler to provide me with
>
> Introspect<A>::FieldTypes
>
> which would be a typedef for
>
> TList<int, TList<double, TList<char *, Nil> > >
>
That makes sense, assuming "Introspect" and "FieldTypes" are new C++
keywords. Are there any C++ compilers that actually do this? I don't
think it's in the current ISO C++ standard.
Is there anything preventing the same techniques in Ada? (assuming we
allow new keywords).
How does this compare with an ASIS tool for Ada? Seems to me ASIS is a
more straight-forward, and more flexible, approach.
> <snip rest>
--
-- Stephe
next prev parent reply other threads:[~2003-02-12 19:39 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-24 3:36 [ANN] an EBNF parser and coding pattern tool (LGPL) Cedric LEMAIRE
2003-01-24 16:40 ` Victor Porton
2003-01-25 0:33 ` llewelly
2003-01-29 2:55 ` Cedric LEMAIRE
2003-01-24 16:40 ` apm
2003-01-29 2:56 ` Cedric LEMAIRE
2003-01-31 2:25 ` Cedric LEMAIRE
2003-01-31 2:25 ` Anthony Williams
2003-02-01 4:10 ` Cedric LEMAIRE
2003-02-04 16:53 ` apm
2003-02-06 20:35 ` Cedric LEMAIRE
2003-02-06 20:36 ` Cedric LEMAIRE
2003-02-01 4:09 ` White Wolf
2003-02-03 1:28 ` Martin Ambuhl
2003-02-03 1:28 ` Hillel Y. Sims
2003-02-03 16:31 ` Tars_Tarkas
2003-02-03 1:29 ` Mark McIntyre
2003-02-03 16:31 ` CBFalconer
2003-02-04 16:53 ` Georg Bauhaus
2003-02-06 20:36 ` Cedric LEMAIRE
2003-02-07 17:33 ` Hyman Rosen
2003-02-08 18:22 ` Thant Tessman
2003-02-07 17:33 ` Anthony Williams
2003-02-11 6:15 ` Cedric LEMAIRE
2003-02-12 1:30 ` Hyman Rosen
2003-02-13 20:03 ` Brian Inglis
2003-02-15 20:13 ` Hyman Rosen
2003-02-15 20:14 ` Cedric LEMAIRE
2003-02-12 1:30 ` Julián Albo
2003-02-15 20:14 ` Cedric LEMAIRE
2003-02-19 6:10 ` Alan Balmer
2003-02-12 1:30 ` Stephen Leake
2003-02-12 18:22 ` Hyman Rosen
2003-02-12 19:39 ` Stephen Leake [this message]
2003-02-12 21:16 ` Hyman Rosen
2003-02-14 20:34 ` Stephen Leake
2003-02-15 20:14 ` Cedric LEMAIRE
2003-02-07 17:33 ` Hyman Rosen
2003-02-03 16:31 ` ozbear
2003-02-03 16:31 ` Cedric LEMAIRE
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox