4 ms·
In a lengthy piece about rational arguments, you would expect somewhere in there someone would actually present a rational argument for switching beyond "it's m
by thehardsphere 9y ago
In a lengthy piece about rational arguments, you would expect somewhere in there someone would actually present a rational argument for switching beyond "it's modern."
I mean, maybe the actual details of the case for switching are slightly beyond the scope the author intended to write about, but simply starting with an assertion that "modern = better, therefore people should have already switched if they were rational" and treating that as self-evident strikes me as highly arrogant and logically fallacious.
- bumbledraven 9y agoIt's kind of amazing to me that OP's 4000-word article doesn't mention -- even once -- the relative complexity of C vs C++.
- thehardsphere 9y agoYeah, you'd think that they would do it at least in a condescending way given their partisan position on the question. Unless... they didn't actually think that much about the topic. I dunno. I didn't watch the video so I don't know if it's in there.
- sqeaky 9y agoBe careful comparing complexity. C might look simple, and C++ might look complex but I have never seen a char* in C++ to mean 2d of jpg images in memory. C++ is more complex, because it covers more concepts. But when you get simple safe and to reusable things from that complex the difficulty is reduced. What is the right way to store and unknown amount of things in C? There are about a million ways to do and every project will implement their and about half will work. Of that half maybe 1 in 10 will have an API that is intuitive to the reader, and depending on the reader that 1 in 10 will be different. Now what if what you an associative container instead? With C++ just using std::vector, because this is a solved. (or map/unordered map for the associative container). This continues on with libraries. Every API needs to have a large series of questions answered every time you pass a pointer. Because C has no concept of ownership who is supposed to delete it? Without const references extra caution to distinguish const pointers and pointers to const things, why is this important? Without templates writing an API that works on multiple types involves dealing with void* at run time, presuming you don't want to actually use anything in the data. C looks simpler because it is smaller. C++ is easier and simpler because it has already dealt with many of the hard problems.
- jernfrost 9y agoLOL, 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?
- deleted 9y ago[deleted]