Is D painted into a corner?

Dukc ajieskola at gmail.com
Fri Aug 29 13:45:33 UTC 2025


On Thursday, 28 August 2025 at 18:47:19 UTC, Brother Bill wrote:
> It seems like 'templates' are the 'Achilles heel' of D.
>
> Without starting a flame war, has D gotten to the point where 
> ordinary mortals have difficulty coding in D with 'templates' 
> such as 'cycle' requiring rewrites into 'myCycle'?

I don't think so.

It is true that template metaprogramming is more complex, slower 
to compile and prone to compiler bugs than C or Java-style 
programming, mostly thanks to templates repeating themselves 
less. But still, for the standard use cases Phobos is still more 
than stable and understandable enough. And so are at least some 
of the other widely-used templated libraries, such as EMSI 
containers and Vibe.D.

Generally, you just need a bit of humblety so you'll stop 
yourself from doing anything too fancy with the templates once 
you realise you have many strange problems popping up. Same as 
with any language feature set.

Compared to C++ templates, it is still almost always easier to do 
the same thing in D. I certainly prefer Phobos ranges over STL 
iterators, Boost, or a dynamically dispatched object-oriented 
solution like LINQ in .NET languages.

>
> Does D now require 'deep' memory into layers of history and 
> workarounds?
>

Didn't understand that question.

> Is D a general purpose language, suitable for Application 
> Programming, or does it have a more limited scope?

It is. I don't even know what that more limited scope would be if 
D was not.




More information about the Digitalmars-d-learn mailing list