3 ms·
From a moderate skim, I'm not seeing much in there that really addresses this beyond FUD and over-simplification. Which, I mean... it's the Internet. That's ki
by Groxx 2y ago
From a moderate skim, I'm not seeing much in there that really addresses this beyond FUD and over-simplification.
Which, I mean... it's the Internet. That's kinda expected. But if there's something specific you're seeing, could you link to it? I'm curious as well what the "stick to C" crowd's reasons are. "C plus this one feature of C++" seems rather defensible at a glance (ignoring the social difficulty in choosing which feature), but I'm sure it's much more complicated than that in practice.
- dzaima 2y agoEven if a project can choose some specific feature(s) to switch to C++ for, it'd severely reduce the barrier for adding reliance on more features; why did feature X get a pass, but not this other one? And C++ has a lot of such potential features that are harmless and easy to justify at their best, but can become headaches when used more broadly, requiring everyone and everything to deal with them.
- Groxx 2y agoThe social aspects are very large and it wouldn't surprise me at all if that was by far the main reason... but that's much less of an issue in a kernel-like context where there are already oodles of rules beyond "write valid C code". They can and do impose significant limitations on the languages they use, successfully, for decades. Seems like they'd be able to do that with C++ too.
- jonathrg 2y agoThere is a comment purporting to show a difference between compilation speeds in C and C++ which uses iostream for the C++ example, which completely misses the point. Sure C++ has a lot of warts, but in terms of compilation speed it should be completely reasonable to use a few simple template functions.
- Groxx 2y agoYeah, that's the main thing I saw and it's just plain completely wrong. The fact that C++ can more easily bloat into large build times, and people frequently make larger-build-time projects in it, implies absolutely nothing about its behavior in replacing simple macros like max/min. There's ample evidence that it'll build just a fast as C there, so it's not an issue in this context, and that both can build quickly with care. That's kinda the point of C++: you can write plain C code plus [this one thing] and you basically don't pay for the rest, and it generally achieves that.