digitalmars.D - Re: PHP-style (embedded variables) print statements
- Dejan Lekic <dejan.lekic gmail.com> Jun 03 2007
- Don Clugston <dac nospam.com.au> Jun 03 2007
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.
Jun 03 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>.
Jun 03 2007