PHP-style (embedded variables) print statements

Don Clugston dac at nospam.com.au
Sun Jun 3 23:39:50 PDT 2007


Dejan Lekic wrote:
> IMHO both implementations are really fine. As someone asked above - is it possible to avoid mixin(echo(...)) somehow, and have nice and clean echo("Blah $(var+1) blah") ? It would  be totally awesome, I think.

AFAIK, it's not possible to eliminate the mixin() yet. But, it will definitely 
be possible with macros. There's a lot of 'low-lying fruit' for macros -- even 
the tiniest bit of syntax sugar will make usage of this kind of code almost perfect.
The nice thing is, that we don't need to postulate about what will be possible 
with AST macros -- we can develop the code already. It's just got these messy 
'mixin()'s all over it. <g>.



More information about the Digitalmars-d mailing list