3 ms·
I don't think purity is the problem. I just think simplicity has value. It makes it possible to keep most of a language in your head. It makes it possible for a
by jernfrost 11y ago
I don't think purity is the problem. I just think simplicity has value. It makes it possible to keep most of a language in your head. It makes it possible for anybody on your team to have a chance of understanding your code.
There was a time I tried to embrace modern C++. Problem is C++ is so big that there will always be lots of people who don't understand the code you are writing. I used to have tech talks to explain concepts like C++ concepts, models and how it relates to STL containers, iterators etc. But ultimately all these efforts is just putting bandaid on a shitty language.
The whole point of programming languages is so people can exchange code and understand each others code. C++ is epic fail in this area.
While Objective-C is also a kind of old and crufty language, it is infinitely simpler than C++.
Maintaining old codebases in anything other than C++ is much simpler for many reasons. Refactoring tools in languages like Java and C# actually works. Refactoring in Ruby or Python is simpler because they more naturally decouple due to their dynamic typing.
Refactoring C++ code is hell on earth because the refactoring tool has to be able to understand macros, C++ templates etc. Any changes to a class interface even private methods or variables requires recompile of all files using that class. Which means doing lots of changes means recompile of lots of files. Which sucks in a large project when C++ is terribly slow at compilation to begin with.
Compare with a language like Go. The syntax is so much more sane that you can actually write simple refactoring tools yourself easily. No way in hell you can do that with C++.
No matter what Bjarne does with C++, they will still be stuck with macros, a fiendishly complicated template system, static initialization and deinitialization mess. As long as you need to remain backwards compatible you are stuck with a lot of awful stuff.
- hellofunk 11y ago>But ultimately all these efforts is just putting bandaid on a shitty language. Well, that's a highly subjective opinion. It sounds like C++ doesn't work for you but I still find it a fascinating and enjoyable language to work in. There are drawbacks with any language, and I guess the drawbacks you find for yourself in C++ are your business.