On 18/04/2009 21:16, Andrei Alexandrescu wrote:
bearophile wrote:
Andrei Alexandrescu:
Yes. The amount of confusion in this thread is staggering.

I think I have misunderstood about the whole thread then. If the
string isn't determined at run time, then this thing isn't useful for
my purposes, and it's not close to the object-C as I was talking
about, and it's not similar to __getattr__ of Python, etc.

Bye,
bearophile

In the syntax

a.b

how would either of a and b be identified at runtime? I mean, you write
the code somewhere and it gets compiled. It's not like you're reading
"a.b" from the console and then call some eval() function against them.


Andrei

what prevents D from having an eval function?
suppose someone modifies the DMD front-end to compile a string with the source code of a function in-memory, than this is processed by something based on DDL and what you get is an API call that takes source code in a string and returns a function pointer.

Reply via email to