Talk by Herb Sutter: Bridge to NewThingia

Ali Çehreli acehreli at yahoo.com
Mon Jun 29 21:29:31 UTC 2020


On 6/29/20 8:45 AM, Dagmar wrote:

 > I am a C++ developer.

I used to be a C++ developer; luckily, I primarily write in D these 
days. (I can still code in C++ and will have to do so again soon.)

 > I do want to move to a modern language, but there
 > is no one that fits my needs.
[...]
 > Go is just an oversimplified language. No generics/teplates in 2020,
 > seriously?

+1 And it's fascinating how they sold all the shortcomings as benefits. 
Amazing!

 > D has a GC.

Coming from C++, I was a die-hard "deterministic destruction" guy and it 
took me a long time to embrace GC. Now I know GC is pure help. GC is no 
more issue than any other engineering decisions.

 > If you turn it off you lose dynamic/associative arrays,
 > classes, probably something else.

Then don't turn it off. :)

I understand there are programs where an undeterministic delay in 
processing is unacceptable but those programs all run on real-time 
operating systems anyway, right? ;)

 > Why would I even want to use such
 > language at all?

For practicality. For getting things done.

 > It's much easier to stay with C++ this way, since it
 > has lots of C/C++ libraries, IDEs, tools, broad community, support of
 > big companies.

It requires a strong C++ mindset to take GC as a liability and accept 
C++ complexities like the following one as manageable:

OOPS: :) I fail to find a reference table that explains implicitly or 
explicitly deleted or defaulted fundamental C++ operations like the copy 
constructor.

Yeah, accepting that kind of complexity but rejecting the GC is 
interesting. (I am not directing this to you but to most C++ programmers.)

 > Of course, since D doesn't look like a mature language. I've been
 > following it for many years and it doesn't really improve. It looks just
 > like a bunch of different things/concepts put together.

That may be true for many languages but when it comes to getting things 
done I find D much more productive, manageable, easier, etc. etc. 
compared to C++. C++ has only one thing over D: Many smart people are 
already using C++.

 > Many things are
 > stalled without of any progress because there is no consensus.
 > The entire DIP process is not good. There is no way to find the current
 > DIP status, no way to learn when and whether it's going to be
 > implemented or not. Have you noticed such questions in the forum 
recently?
 > The current status of the language is unclear. Sometimes there is only
 > one way to find out why it behaves like it does: to ask in this forum.
 > And you may not like the answers.

 > D has transitive const, but what if I
 > should lazy evaluate/cache a value or use a mutex?

Although I agree that transitive const is the correct feature, I too 
find it difficult.

 > If I shouldn't use
 > const, how should I emphasize the intention to pass a pointer only for
 > reading? How can I be sure that my class invariant is not compromised?
 > Also, there is the shared attribute, but it isn't designed nor
 > implemented well. Lots of questions, no solutions. D is intended to be a
 > C++ replacement, but it doesn't explain to C++ programmers how to change
 > their way of thinking.

There is this dated document:

   https://dlang.org/articles/cpptod.html

Although dated, that document should be sufficient to jump to D from C++. :)

 > Maintainers don't like to make breaking changes when they are required.
 > Come on guys, it's called an evolution.

Interestingly, one of the criticism D gets is how it evolves with 
breaking changes. :)

 > That's why C++ is so
 > overcomplicated right now. It tries to keep backward compatibility at
 > all costs. I hope you don't want D to get into the same situation? Any
 > modern language requires a chance to evolve. Sometimes you just have to
 > break something. And making it once in a year (or 2-3 years) doesn't
 > look like a bad option to me.

I agree.

Ali



More information about the Digitalmars-d-announce mailing list