DIP 1027--String Interpolation--Final Review Discussion Thread
Adam D. Ruppe
destructionator at gmail.com
Wed Feb 5 02:38:37 UTC 2020
On Wednesday, 5 February 2020 at 00:01:53 UTC, jmh530 wrote:
> For instance, if I have a function
> void foo(string x) {}
> then I would have expected to be able to pass an interpolated
> string literal to it just as in any other. However, a closer
> reading of this DIP suggests that is not intended.
Right, that will not work with any of the active proposals.
Though with mine, you will get a type mismatch error if you try
and you can put `.idup` on it to make a copy into a GC string. So
it is still easy enough... while being possible to do *so* much
more with it too.
(and even with Walter's original one, you can import std.format;
and then i"xxxx".format() to do it too.)
More information about the Digitalmars-d
mailing list