Is D painted into a corner?
Lance Bachmeier
no at spam.net
Fri Aug 29 01:52:59 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'?
Templates are in general a horrible way to program. Therefore I
don't use them very much. When I do, I don't do anything
complicated. But everyone has their opinion on that. I similarly
don't use attributes. I prefer simple code with a simple
language. Hard to avoid ranges in Phobos, which can be crazy
complex/inconvenient at times, but every language has its warts.
> Does D now require 'deep' memory into layers of history and
> workarounds?
Not if you stick to the simple parts, like interfacing with C and
writing scripts.
> Is D a general purpose language, suitable for Application
> Programming, or does it have a more limited scope?
Yes. I use it for scripting and numerical programming
(specifically, statistical work). Great for those use cases. Once
you get into the complexities of templates and attributes and all
that "stuff" you've lost the battle. Oh, and it has a garbage
collector that you can use or not use, that's great too.
More information about the Digitalmars-d-learn
mailing list