How can I dump an expression into log and execute it

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Fri Jul 11 15:59:09 PDT 2014


On Friday, 11 July 2014 at 22:38:36 UTC, Idan Arye wrote:
> On Friday, 11 July 2014 at 17:00:32 UTC, Dicebot wrote:
>> Full macro system is not needed to implement it, just AST 
>> reflection can do the trick (and has better fit with existing 
>> features).
>
> Wouldn't AST reflection be more complex to implement&use than a 
> macro system? I mean, a macro system is quite functional in 
> nature - the macro takes AST arguments and return an AST that 
> the compiler embeds into the code. With AST reflection, you 
> need to mutate an existing AST, which is more complex because 
> order of execution matters.

I mean read-only reflection akin to existing __traits


More information about the Digitalmars-d mailing list