4 ms·
>There are too many corner cases and oddball stuff to deal with. It seems like all the langauges I've used, from objective-c to swift and Clojure require you t
by hellofunk 11y ago
>There are too many corner cases and oddball stuff to deal with.
It seems like all the langauges I've used, from objective-c to swift and Clojure require you to keep certain aspects of the language in mind for certain situations that don't on the surface seem obvious. Purity in any language is quite rare.
In the case of C++, it is possible to ignore much of that old baggage most or maybe even all of the time if you write new code using new features. I agree that those maintaining much older codebases are going to have a rough time, but is not an uncommon problem in many languages.
Also, even in a so-called "better" language you can run into massive refactoring projects with older code once you choose to adopt new libraries and tools. As Bjarne says, C++11 is much better, C++14 will be even better, and C++17 is further going to be better... frankly, this is a good path for any language to be on.
- gbersac 11y agoThere is much more weird stuff in c++ than in any other language. Especially rust. Add to that that you also have to deal with the Makefile/Cmake garbage. Another solved by rust (rust is shipped with cargo which release you of the makefile hell).
- jernfrost 11y agoI 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.