5 ms·
Once rust stabilizes, I think it needs an ISO standard like C and C++ have. I can't see automobile manufactures using rust without one. One reason C and C++ are
by _wldu 4y ago
Once rust stabilizes, I think it needs an ISO standard like C and C++ have. I can't see automobile manufactures using rust without one. One reason C and C++ are still widely used is due to this. When we are writing code that is expected to run for decades, having a corporate/community backed language is not sufficient. We need global standards and versions that we can rely on decades latter.
- avgcorrection 4y agoI think C caught on because it spread like a cancer through institutions like universities. Want to catch on? Be a virus. Not some gosh-darned international standard.
- pjmlp 4y agoNice way to view UNIX, a virus.
- rwaksmunski 4y agoLack of standards committee body making decisions is feature, not a bug. Car manufactures can stick with C.
- Avamander 4y agoConsidering how "smart" cars are getting, no, they shouldn't.
- pie_flavor 4y agoWhat has the standard actually gotten C and C++? Basic features needed in every single code base like type punning on structures are standardly UB, while design-by-committee results in C++ feature hell. It doesn't get any harder to write a function exhibiting a bug just because there's a standard saying the function shouldn't have bugs in it. No matter what, you are trusting a compiler vendor that the code it compiles and the functions it links against don't have bugs. A standard is not a magic spell that creates better software through its incantation; it provides for multiple separate compiler vendors to be able to compile the same code the same way, which is a total fiction in C/C++, and not required for languages like Python or Lua. I view it as nothing more than the streetlight effect.
- bregma 4y agoA part of the safety story of any useful toolchain compliant to ISO 26262 as a SEOOC is that it verifiably implements the language as documented in the standard. The "verifiably" part is important. If there is no standard to verify against, how do you know it's doing the right thing? The language standards themselves state outright that programs containing undefined behaviour are malformed. If you write malformed programs, you can not assume that they are safe. Don't blame language standardization for your writing bad, unsafe software if you're not going to follow it. In addition verifiably conformant compilers for translating your programs into software, the standard allows other tools to be written to perform things like static analysis, complexity analysis, and conformance to other published guidelines (eg. MISRA). These things are not possible where the definition of the language is "whatever one single toolchain vendor decides it will be this week".
- Avamander 4y ago> What has the standard actually gotten C and C++? As the person you replied to said, usage by other industries. Replacement to MISRA C maybe even.
- shadowofneptune 4y agoC89 did: • FILE* was a big I/O abstraction that C did not have before. With Unixes and MS-DOS there were file handles, but many other platforms had nothing like that. • That there was a clear idea of what kind of operations were well-defined was a pretty big deal. Remember, all there was before was K&R to go off as a reference, or maybe you had access to the Portable C Compiler. It was also a time where you had a lot more oddball architectures. • void return types and parameters. There was no idea of a procedure in early C, only functions with useless return values. And of course more. There are definitely worse cases of ISO standards than C and C++. Both are noticably better out of it.
- scoutt 4y ago> No matter what, you are trusting a compiler vendor that the code it compiles and the functions it links against don't have bugs. I guess the key factor about a standard is that as a corporation you can point fingers if something goes wrong ("the compiler and/or the MISRA C checking tools you sold me are not compliant with the standard because of this bug!"). Also the committee can point fingers back if required ("the UB is clearly specified in the standard!"). If I were a team manager at a big automotive factory in charge of the ECU system, I would go the private way, with guarantees, and paying a lot of money. In case of failures, I can point fingers and someone would answer the phone on the other side if I complain. Who should I call or who should I point my finger at, if something goes wrong because of a bug in Rust? A Github user on the other side of the planet?
- steveklabnik 4y agoThe industry has already taken an interest in Rust; a lot of things going on aren't public yet, but we've seen job openings, and things like https://www.autosar.org/news-events/details/autosar-investigates-how-the-programming-language-rust-could-be-applied-in-adaptive-platform-context/ https://www.autosar.org/news-events/details/autosar-investig... ISO Standards are not generally required. https://news.ycombinator.com/item?id=28366670 https://news.ycombinator.com/item?id=28366670
- infamouscow 4y agoThe US government has a very long history projecting it's will on other countries. Under the guise of national security, what is stopping the US government from changing Rust to prevent it from working in Russia, Iran, or Canada? The scenario is somewhat hyperbolic, but the US and European centric nature of Rust gives people in less developed nations pause.
- bogeholm 4y ago> what is stopping the US government from changing Rust to prevent it from working in Russia, Iran, or Canada? Well, for one Rust is open source, so you could download the source code and comment out the country ban yourself?
- KerrAvon 4y agoWhy would the US government care about Rust? And what could they possibly legislate to change it? Do you have a plausible scenario in mind?
- steveklabnik 4y agoA senator^Wcongressman asked some questions about Rust and its nightly toolchain whenever Facebook’s cryptocurrency was under scrutiny by regulators. A French government agency has a whole set of coding guidelines for Rust. The government of Quatar was using Rust before 1.0; haven’t heard much since, but I assume they’re still using it. A New Zealand firefighter company was using some Rust. Programming languages are tools. Governments use tools. It shouldn’t be surprising that they may have an interest. That said I find your parent comment also a bit silly for the other reasons you state.