Objective-D, reflective programming, dynamic typing

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri Apr 3 09:44:09 PDT 2009


grauzone wrote:
>> But my point was that variadic templates can be ideal wrappers for the 
>> non-templated variadics, which can be virtual. It's the best of both 
>> worlds, you get no bloating and comfortable calling syntax too.
> 
> The problem is: you can't go back.

Of course you can't go back. How could you possibly?...

> Here I use runtime as synonym for 
> passing pointers/TypeInfo and compiletime for nesting templates:
> 
> compiletime -> runtime: simple
> compiletime -> compiletime: very simple
> runtime -> runtime: simple
> runtime -> compiletime: oops
> 
> It also generates bloat by requiring a compiletime -> runtime part. Why 
> do this conversion, if you want to be in runtime anway?

You see, you really don't know what you want. (I don't mean this 
pejoratively.) Previously you wanted convenient call syntax. That means 
you don't build stuff at runtime, you just write it and want it to work. 
Now you say you essentially don't care for that. Then build an array of 
Variant and be done with it.

> If you want to do "very dynamic" stuff (whatever that is), applying some 
> trivial fixes to variadic functions seems to be the better way to go.

I disagree. If you have a point, it is not carried on very strongly.


Andrei



More information about the Digitalmars-d mailing list