6 ms·
The complexity of C# and C++ should be a warning, not something to strive towards. C++ has 3 reasonable implementations, C has hundreds, for all sorts of platfo
by nananana9 1y ago
The complexity of C# and C++ should be a warning, not something to strive towards. C++ has 3 reasonable implementations, C has hundreds, for all sorts of platforms, where you don't get anything else.
Most C developers don't want a modern C, they want a reliable C. WG14 should be pushing for clarifications on UB, the memory and threading model, documenting where implementations differ, and what parts of the language can be relied and what not.
Nobody really needs a new way to do asserts, case ranges, or a new way to write the word "NULL".
- lifthrasiir 1y agoC++ historically had much more implementations. It is probably more about the availability of quality compilers that are free to use and adapt, because even in C most new compilers for niche platforms are now based on GCC or clang for the practical reason.
- pjmlp 1y agoBoth implementated in C++. As someone that remembers the t-shirts with "my compiler compiles yours" that some C folks used to wear, it is kind of ironic having that turned around on them.
- motorest 1y ago> The complexity of C# and C++ should be a warning, not something to strive towards. I think this talk about "complexity" is a red herring. C++ remains one of the most popular languages ever designed, and one of the key reasons is that since C++11 the standardization effort picked up steam and started including features that the developer community wanted and was eager to get. I still recall the time that randos criticized C++ for being a dead language and being too minimalistic and spartan. > C++ has 3 reasonable implementations, C has hundreds, for all sorts of platforms, where you don't get anything else. I don't understand what point you are trying to make. Go through the list of the most popular programming languages, and perhaps half of them are languages which only have a single implementation. What compelled you to criticize C++ for having at least 3 production-quality implementations? > Most C developers don't want a modern C, they want a reliable C. You speak only for yourself. Your personal opinion is based on survivorship bias. I can tel you that as a matter of fact a key reason why the likes of Rust took off was that people working with low-level systems programming were desperate for a C with better developer experience and sane and usable standard library. > Nobody really needs a new way to do asserts, case ranges, or a new way to write the word "NULL". Again, you speak for yourself, and yourself alone. You believe you don't need new features. That's fine. But you speak for yourself.
- npoc 1y agoI agree. A lot of new additions to C++ make coding with it simpler, not more complex. However it does mean there's more to learn, because the old style of the language still exists and is still accepted by the modern compilers as opposed to say, Rust which removes replaced language features when it releases a new edition.
- pjmlp 1y agoLanguage, not libraries. Editions are rather limited in what they support. Try to design a crate that stays compatible across editions, while using libraries that have changed signatures across editions. The crate itself keeps its own edition fixed.
- babaceca 1y agoThe vast majority of C programmers will agree that they don't care for any of the new features, as is clearly evident by the fact that almost nobody elects to use the latest standards. The "most popular programming languages" are irrelevant here. C and C++ are standardized languages, and also the tools we use for code that actually matters. A standard that can't be implemented is worthless, and even the "3 high quality" implementations of C/C++ haven't fully implemented the latest 2 editions of either language. There's a lot more riding on these two languages than you give credit for, and they should be held to a higher standard. C is not the language to experiment with shiny new features, it's the language that works. > I can tel you that as a matter of fact a key reason why the likes of Rust took off So what's the problem? If Rust is gaining traction on C/C++, and people are excited about what it brings to the table, use it. We'll both do our thing, let it play out - we'll see which approach yields better software in 10 years.
- motorest 1y ago> The vast majority of C programmers will agree that they don't care for any of the new features,(...) I think this belief is based on faulty assumptions, such as survivorship bias. C++ became popular largely because it started off by extending C with the introduction of important features that the developer community wanted to use. The popularity of C++ over C attests how much developers wanted to add features to C. C++ also started being used over C in domains where it was not an excellent fit, such as embedded programming, because the C community prefered to deal with C++'s higher cognitive load as an acceptable tradeoff to leverage important features missing from C. The success of projects such as Rust and even Zig, Nim also comes at the expense of C's inability to improve the developer experience. Not to mention the fact that some projects are still developed in C because of a mix of inertia and lack of framework support. So to claim that the C programmers do not want change, first you need to ignore the vast majority that do want but already dropped C in favor of languages that weren't frozen in time. It's also unbelievable to claim that a language that precedes the concept of developer experience represents the apex of language design. This belief lands somewhere between Stockholm syndrome and being mentally constrained to not look beyond a tool.
- pjmlp 1y agoMost single C implementations have died out. There is hardly any C compiler worth using that isn't equally a C++ compiler . In fact, there is any C compiler left worth using that hasn't been rewriten into C++.
- gustedt 1y agoThat may be true in your bubble, but I don't think this is true in general. There are still a lot C compilers out there, compared to 3 or 4 that do C++.
- pjmlp 1y agoOther than legacy embedded CPUs like PICs, I doubt it.
- aninteger 1y agoThere seems to be at least 2 lcc forks (lcc-win32/win64, and pelles-c) that have their own small communities. Although maybe they are dead.
- pjmlp 1y agoVery tiny small communities, what product is being shipped with them?
- WalterBright 1y agoMy current C compiler is implemented in D :-)
- pjmlp 1y agoPlus points for BetterC.
- WalterBright 1y agoCheck out all the extensions added to C, all incompatible with each other.