DIP 1027--String Interpolation--Final Review Discussion Thread

Adam D. Ruppe destructionator at gmail.com
Wed Feb 5 16:11:54 UTC 2020


On Wednesday, 5 February 2020 at 16:02:03 UTC, Arine wrote:
>     // current proposal, doesn't "just work":
>     sql(i"SELECT * FROM $table WHERE value = $value");
>     sql("SELECT * FROM %s where value = %s", table, value); // 
> error

That's Walter's proposal. With *my* proposal, the decision for %s 
or ? or whatever is made by the library function (which is passed 
the knowledge it needs to know to make a smart decision) instead 
of by the language. So, for the end user, those things DO just 
work.

Remember: I am NOT defending DIP 1027 as-is. I am defending our 
amendment to it/rewrite of it.

See:
https://gist.github.com/adamdruppe/a58f097d974b364ae1cbc8c050dd9a3f


More information about the Digitalmars-d mailing list