Re: OON: Can separate compilation deal with expression templates ?

From: Andrew Reilly (areilly@bigpond.net.au)
Date: Wed Apr 11 2001 - 20:59:40 EST


On 11 Apr, Jim Edwards wrote:
> The export keyword should do this, but I don't know of

Really? I'm very surprised that anyone even thinks that this is
possible.

Templates, as a specific mechanism for generic object programming
are "meta-programming" constructs. The compiler can't know how to
generate the code until you specify the type arguments in the
client application. Since it can't generate the code, the code
can't be put into a library.

Well, not with anything like the efficiencies that people usually
expect from template/generic programming. Maybe you could do
something with run-time type mechanisms and introspection: yuck.

Maybe some sort of dynamo-like run-time recompilation system,
based on a virtual machine that explicitly has room for generics
(unlike Java) could do something useful, but then that's something
that "seriously depends on compilers", which is outside the scope
of the original request.

-- 
Andrew

--------------------- Object Oriented Numerics List -------------------------- * To subscribe/unsubscribe: use the handy web form at http://oonumerics.org/oon/ * If this doesn't work, please send a note to owner-oon-list@oonumerics.org



This archive was generated by hypermail 2b29 : Wed Feb 20 2002 - 03:20:15 EST