On Tuesday, 26 January 2016 at 21:01:53 UTC, bachmeier wrote:
"With C++xx, there's little benefit to switching" is a very common sentiment among current C++ programmers. And it's probably true.

It's not true.

After failing to convince my coworkers to use D, I wondered about this. I actually thought, myself, that C++14 is good enough and nearly like writing D. I was wrong.

I've recently spent about 2 or 3 months writing C++14 at work. I ended up complaining a lot. Most of the time because I'd written a bug that wouldn't have happened in D. The rest was usually due to something supposedly simple taking an inordinate amount of work.

And the compile times... I never used to think they were _that_ important. I do now. I actually think slower when writing C++, which means I work slower. It sounds obvious, but I only really felt it recently.

The penny really dropped when I wrote D again for the 1st time after weeks and weeks of C++14. It was night and day. Suddenly my thoughts started getting to converted to code all that faster, with fewer bugs to distract and annoy me.

Don't get me wrong: I vastly prefer C++14 to C++98 or plain C. But even modern C++ needs this:

https://en.wikipedia.org/wiki/Erase%E2%80%93remove_idiom

Which is, quite frankly, ridiculous. Do you know how you split a string in C++? You install boost, that's how.

Atila

Reply via email to