4 ms·
> There is really no legitimate reason to code C anymore That's an interesting statement. Reminds me of statements indicating any new code base should be start
by tejohnso 4y ago
> There is really no legitimate reason to code C anymore
That's an interesting statement. Reminds me of statements indicating any new code base should be started in rust over c++.
- pjmlp 4y agoThe rewrite in C++ movement was lived in Usenet flamewars, and we were in good path with all the userspace C++ frameworks in OS/2, MS-DOS, Windows, Apple and BeOS until the GNU Manifesto came around and urged everyone to write FOSS code in C. "Using a language other than C is like using a non-standard feature: it will cause trouble for users. Even if GCC supports the other language, users may find it inconvenient to have to install the compiler for that other language in order to build your program. So please write in C." GNU Coding Standard in 1994, http://web.mit.edu/gnu/doc/html/standards_7.html#SEC12 http://web.mit.edu/gnu/doc/html/standards_7.html#SEC12
- moloch-hai 4y agoStuff written about C++ before there was an ISO Standard obviously does not apply after. And, we should know by now how much Richard Stallman's prejudices are worth.
- pjmlp 4y agoBy all means, GNU Coding standards from 2006, 8 years after C++98. "When you want to use a language that gets compiled and runs at high speed, the best language to use is C. Using another language is like using a non-standard feature: it will cause trouble for users. Even if GCC supports the other language, users may find it inconvenient to have to install the compiler for that other language in order to build your program. For example, if you write your program in C++, people will have to install the GNU C++ compiler in order to compile your program. C has one other advantage over C++ and other compiled languages: more people know C, so more people will find it easy to read and modify the program if it is written in C. So in general it is much better to use C, rather than the comparable alternatives." http://gnu.ist.utl.pt/prep/standards/html_node/Source-Language.html#Source-Language http://gnu.ist.utl.pt/prep/standards/html_node/Source-Langua... As project lead, his opinions always mattered for what goes into GNU. What the rustaceans are doing nowadays I lived as C++ fanboy, so I am pretty aware how things went. Remember that besides the license issue, another big reason why GNOME came to be was because KDE uses C++, hence the whole GObject stuff in C.
- moloch-hai 4y agoYou emphasize my point so clearly, I need add nothing. But I will note that GNU Gcc and Gdb are both C++ projects now. Gold, the current GNU linker, started out C++. Are there any other still-relevant GNU projects?
- pjmlp 4y agoThat is now, we were talking about when GNU/Linux started to be relevant and what triggered language choice, versus what was happening in the desktop PC world. The latest version of the GNU coding standard is much more permissive.
- zozbot234 4y agoYes but back then you could compile C with a C++ compiler and get the same type checking as in actual C++. There were a few pitfalls but a shared "Clean C" coding style was viable and that's what most of the rewriting effort was focused on. C++ did add stronger modularity with its public and private member specifiers, namespacing etc. but that was mostly useful on larger projects.
- moloch-hai 4y agoRust can still fizzle, like Ruby has. It is still far from clear whether anybody will be learning Rust, in ten years, instead of whatever is the new hotness then. Hiring a domain expert who also knows Rust is generally impossible today, and will be for, at least, a long time. So, starting a new project in Rust is OK for a project you know won't matter, but absurdly risky for one that will. C++ is mature. None of the above is a concern, for C++.
- AgentOrange1234 4y agoHrmn. Hiring rust experts may be hard, but the opportunity to learn rust on the job could be appealing to a lot of devs who want to grow?
- moloch-hai 4y agoDomain experts are focused on their domain. Becoming a beginner again is a recipe for radically reduced productivity. The people eager to learn a new language on the job are generally those who have not invested much in anything.
- AgentOrange1234 4y agoIt’s not like rust is some radically different thing. Getting productive with it should take a good developer what, a couple of months?
- int_19h 4y agoIn terms of adoption by pre-existing large players in the industry, Rust is already ahead of where Ruby was at its hype peak. It's just not quite as shiny because that code is not running some web app that is immediately demo-able, but some boring OS infrastructure stuff. Given the money already invested into internal tooling and infrastructure specifically for Rust, I just don't see those large companies suddenly dropping it. Regardless of how good the language itself is, the sunk cost alone makes it hard to turn ship. And the language is good, so it'll use that time to entrench itself further.