String Interpolation

bachmeier no at spam.net
Wed Oct 25 20:07:32 UTC 2023


On Wednesday, 25 October 2023 at 19:15:42 UTC, duckchess wrote:

> ```d
> writeln(i!"${foo++}"); // error, cant mutate foo. need to use 
> explicit mixin(i!"${foo++}")
> ```

If someone wants to do this, they clearly don't understand the 
purpose of string interpolation. Code like that should be 
reserved for the C preprocessor.


More information about the Digitalmars-d mailing list