4 ms·
LOL, C++ developers complain about C developers being impervious to reason, yet can't admit one of the most blindly obvious problems with C++. Plenty of languag
by jernfrost 9y ago
LOL, C++ developers complain about C developers being impervious to reason, yet can't admit one of the most blindly obvious problems with C++. Plenty of language manage to be more expressive than C++ while being far less complex. C++ is an uncritical grab bag of features. If you don't carefully design features to complement each other you can C++ style complexity.
C simplicity is real. It makes it easy to write compilers. Compare with the enormous complexity of writing a C++ compiler. This is actually quite important as any software development needs tools. Writing tools for simple languages is easier. Writing tools for C++ is next to impossible. Most of my C++ career I have never had proper refactoring tools. I haven't even been able to use a lot of C++ features because it has taken so many years for all compiler writers to implement all the features.
I can't think of a single other language where it has been so many years of lag between a language specification and it being widely adopted among major compilers.
The simplicity of C makes it easy to interface C with a huge number of other languages. C++ can't interface with almost anything. It is just way too complex.
A much saner superset of C, is Objective-C which can actually interface very easily with other languages.
- sqeaky 9y agoYou are lumping me in with some strawman who insulted you, then you insult me calling me "impervious to reason". You are not interested in a real exchange of ideas. I will respond to your points in the spirit of open exchange anyway, but if you continue to be rude it will just shine a poor light on C programmers as a whole. Since I feel you ideas are lacking factually this might seem like an attack, it is not an attack and I even ask for more information on points with merit. I have pointed out that elsewhere in this thread that the standardized C ABI is perhaps the only thing I like about it. C++ can seamlessly use this, but not by default (which is a weakness of C++). So anything C inter-operates with C++ can too. So your point that C++ inter-operates with less is entirely without merit. Using this I have interoperated with Lua and Ruby from C++, it works well. To push interop further there are several tools like SWIG that seek to allow exchange of rich objects between languages (rich objects that C doesn't even have), and these tools work. I have written code that throws exceptions from Java an catches them in C++ (and vice versa of course) and things of similar complexity in a few other languages. It feels fantastic to have low or 0 cost abstraction around passing complex objects between systems and have all the code that does that strongly checked at compile time (And covered in Unit tests too that but that could be done in C too, I just don't see it often). As for tooling, I again think your points are largely without merit. The are plenty of tools for both languages and there are plenty of simpler languages with less tools. It seems to me that the amount of tooling is not related to complexity but rather popularity of the language. A language that is functionally driven by one vendor and supplanted by that vendor with a newer language (swift) is not a reasonable solution to most problems. I am curious about we makes it interop better than interop with C++, what does it do right that C++ does wrong?
- dllthomas 9y ago> it will just shine a poor light on C programmers as a whole. Hey now, most of us have nothing in particular to do with this guy!
- deleted 9y ago[deleted]