[OT] C# can do all the interpolated strings now
Steven Schveighoffer
schveiguy at gmail.com
Thu Dec 9 14:25:10 UTC 2021
On 12/9/21 8:50 AM, Ola Fosheim Grøstad wrote:
> On Thursday, 9 December 2021 at 13:24:14 UTC, Adam D Ruppe wrote:
>> On Thursday, 9 December 2021 at 13:03:21 UTC, Ola Fosheim Grøstad wrote:
>>> But don't you think it would be better if you could write:
>>
>> No.
>
> How is:
>
> ```sql(i"SELECT $(r[0]), $(r[3]), FROM $(t[3]) WHERE $(c[6])")```
>
> An improvement over:
>
> ```sql("SELECT", r[0], r[3], "FROM", t[3], "WHERE", c[6])```
>
> ?
>
> It obviously isn't!
What is that sql function doing? It's not just concatenating strings,
and it's also not anything I would ever want to use, in original or
interpolation form. It appears to suggest it's going to happily do sql
injection as well.
> This will end up being a marginal feature.
For this fictitious example, maybe. But I already see huge potential in
my real actual libraries that I've written.
You don't have to use it if you don't want to.
-Steve
More information about the Digitalmars-d
mailing list