[OT] ISO C++ 17 changes
evilrat via Digitalmars-d
digitalmars-d at puremagic.com
Mon Apr 3 22:36:55 PDT 2017
On Tuesday, 4 April 2017 at 05:18:26 UTC, Dukc wrote:
> On Tuesday, 4 April 2017 at 02:43:26 UTC, evilrat wrote:
>> String interpolation would be nice too, it would really help
>> with readability!
>
> But if all you want is to construct some code in
> interpreter-like way at compile time, string mixin does
> precisely that.
No, just static symbols will be enough. Not really interpreter
but common day-to-day things like print some formatted stuff
while keep it readable.
I know it is easy to do with string.format() but it'll add more
commas, templates, mixins or all at once, which is without decent
tools like Visual Assist for C++ doesn't really makes it better.
void printStuff()
{
int someInt = calcSmth();
string someName = getSmthDisplayName();
// ... do other things ...
writeln("Your item: {#someName} = {#someInt}");
}
More information about the Digitalmars-d
mailing list