CTFE ^^ (pow)
Walter Bright
newshound2 at digitalmars.com
Fri Mar 23 19:16:45 UTC 2018
On 3/23/2018 11:09 AM, Manu wrote:
> [...]
You make some good points. The CTFE one is kinda inexcusable on our part,
because it was trivial to implement (just more or less add some table entries
and some glue copying existing examples), and there were posts after posts here
and on bugzilla talking about it and nobody doing anything about it.
Rvalue references are not trivial and can have major unintended consequences.
They're a rather ugly feature in C++, with weirdities. I doubt D will ever have
them.
Regarding ARC, we've tried on that front numerous times. Still we don't have a
good RC solution, but it isn't for lack of trying.
But at some level, D cannot replace C++ on a line-by-line basis. There's always
going to be something different. If not in the core language, in the way the
standard library works. If you're heavily using templates and stuff in C++,
you're likely going to have to rethink how the code works to get it in D (or any
other language).
For example, in my efforts translating C to D, the clumsy part is the
metaprogramming in the C preprocessor. There's nothing there D cannot do, but it
has to be redesigned. The result is much better, but translating by rote is
simply impossible.
Also, just try translating some of the code in Phobos to C++. It was tried to do
ranges for C++, and the result was terrifying. (It worked, but that's about all
that could be said for it.)
More information about the Digitalmars-d
mailing list