How usable is the D language without a garbage collector?
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Sun Jul 17 05:36:37 UTC 2022
On Saturday, 16 July 2022 at 22:23:36 UTC, welkam wrote:
> It was said before but I will repeat it. Try not to view D as
> C++ with its flaws fixed but as C with features added to it. If
> you would to expect D to behave like C++ you will get
> frustrated as D doesnt behave like C++ in some cases.
Well, C++ has been distancing itself from C for a long time and
new features makes this more and more true for modern C++.
C is a legacy language that is in for the long haul, but trying
to merge higher level concepts with C leads to unnecessary
complications. There are some decisions in D that undermines what
C tries to achieve, like having wrapping signed int, having non
zero default initialization for built in types and GC dependent
language features.
In total, C++ is more of a C with features added, making C
constructs and idioms more and more obsolete. Making C++
increasingly more high level.
D is more like an attempt to merge C, Java and templates, but
trying to find a path back to C patterns while retaining some
memory safety rather than providing abstractions of a higher
level to deal with in optimization. It is unclear whether there
is a market for C idioms. It might be waning...
More information about the Digitalmars-d
mailing list