www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: PHP-style (embedded variables) print statements

reply Dejan Lekic <dejan.lekic gmail.com> writes:
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
parent Don Clugston <dac nospam.com.au> writes:
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