How can I dump an expression into log and execute it

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Mon Jul 14 02:16:53 PDT 2014


On 13/07/14 17:11, Dicebot wrote:

> AST reflection + string mixins can do anything that AST macros can do -
> assuming one does not want to allow transparent macros (without explicit
> mixin/macro keyword at call site) which is a terrible idea in my opinion
> anyway.

I think that is the same thing as operator overloading.

auto a = b + c;

The + operator can be overloaded without you knowing.

What about if it wasn't transparent? I don't like using a keyword but 
perhaps a symbol, like Rust:

foo!("asd");

In Rust ! indicates a macro invocation. But this is already occupied in 
D for template instantiation. I wonder if we can come up with another 
good symbol.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list