On Friday, 29 April 2022 at 12:57:15 UTC, Steven Schveighoffer
wrote:
On 4/28/22 10:48 PM, Salih Dincer wrote:
[...]
There is no string interpolation in D. You can use a function
such as `std.conv.text` to produce a string given interleaving
strings and items. Or you can use `std.format.format` to make
it happen.
It looks like you want to take any number of parameters as a
template parameter comprised of a tuple of strings? That isn't
supported. What you instead created was a tuple with a name
that shadows the outer name. Note that `string` is NOT a
keyword in D, it's just an alias (one that the compiler
recognizes specially). So it's possible to redefine string as a
symbol to mean something else.
-Steve
It's not a keyword yet it's recognised specially by the
compiler... What?
I'm understanding the concept over here, but why didn't we make
`string` a keyword anyways since the compiler recognises it
specially?