On Monday, 25 December 2017 at 10:40:09 UTC, Mike Parker wrote:
On Monday, 25 December 2017 at 10:06:31 UTC, Mike Franklin
wrote:
On Sunday, 24 December 2017 at 10:11:37 UTC, Dan Partelly
wrote:
D as betterC really is a game changer, for anyone who cares
to give it a try.
Yes, it really is.
The fact that -betterC exists is a glaring admission that D
"got it wrong".
I strongly disagree. D got it right, but when there's a heavy
investment in an existing code base, there has to be a strong
incentive to port to a different language. The less work
required to do so, the lower that barrier becomes.
Support for inner classes was motivated by a desire to make
porting Java code easier. Support for COFF was motivated by
requests to better integrate with existing Windows toolchains.
extern(C), extern(C++), -betterC, and a future "Better C++" are
all in that vein.
None of this is evidence of anything D got wrong, but rather
that the range of excuses for not adopting D is shrinking.
To clarify Mike's point, the dmd backend was taken from the
existing dmc C/C++ compiler, which started in the '80s. It
wasn't written in D because D didn't exist back then! The
backend could be turned into normal GC'ed D, but Walter still
supports dmc and I guess it's easier to just port it all to
betterC D.
IOW, it's not a matter of what D got wrong that it needs betterC
but what those old languages got wrong that D must adapt to,
because of all the old C/C++ code out there.