String interpolation, after a healthy debate on discord

Nick Treleaven nick at
Tue Dec 14 18:29:52 UTC 2021

On Tuesday, 14 December 2021 at 12:29:57 UTC, rumbu wrote:
> We have 100 keywords in D and many of them have multiple 
> meanings (scope, static, if, is, in, out, const, do, enum, 
> return)

static mostly comes from C++.
The only one of those D added that isn't natural and consistent 
is enum for manifest constant. I grant you some leeway for the 
unary `is` type check, but it still seems a natural extension 
from the binary form. (It is easy to read and understand).

> C++ is not necessary a complex language, STL usage and 
> associated idioms makes it complex.

If you compare the spec for the subset of D which C++ can 
implement, I think you will find it is more complex than the spec 
for D. References and lambdas for example.

When designing a language, minimizing the set of keywords is not 
necessarily a good goal, the opposite is often true. You want 
code to look obvious. There are often tricks to reuse keywords, 
I'm glad D generally doesn't do that.

More information about the Digitalmars-d mailing list