AST like coding syntax. Easy upgrade!

Zoadian via Digitalmars-d digitalmars-d at puremagic.com
Sun Sep 6 13:22:21 PDT 2015


On Sunday, 6 September 2015 at 19:32:58 UTC, Prudence wrote:
> template X(Y)
> {
> 	string X = Y.stringof;
> }
>
> [...]


as you'd have to write a parser for other languages why not just 
use strings? you can already do this:

template X(string Y)
{
	enum X = Y;
}

auto s = X!q{int 3;};

obviously X has to be a compiletime js->d compiler.


More information about the Digitalmars-d mailing list