Objective-D, reflective programming, dynamic typing

Georg Wrede georg.wrede at iki.fi
Sat Apr 4 08:04:44 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. 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?
> 
> 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.

The canonical way of doing "very dynamic stuff" would be to use 
JavaScript within the D application.[1]

So, I guess at this point some use cases or other motivators could be 
good for the actual point you're driving?

----

[1] For other readers: yes, yes, and the other languages too (Lua, 
Python, etc...)



More information about the Digitalmars-d mailing list