5 ms·
It doesn't even have to stop progress. C++ does a new rev of the standard every 3 years. Rust has editions, which is a similar but less rigorous concept, and
by not2b 6y ago
It doesn't even have to stop progress. C++ does a new rev of the standard every 3 years. Rust has editions, which is a similar but less rigorous concept, and which could be made more rigorous.
- thesuperbigfrog 6y agoExactly. The C++ standard (https://isocpp.org/std/the-standard https://isocpp.org/std/the-standard) is the specification that describes what a compiler must do to implement a particular "version" of C++ (for example, C++ 20). Just as there is a C++ standard and multiple C++ compilers that implement the standard, there should be a Rust standard and multiple implementations. This is the way that mature languages work.
- steveklabnik 6y agoThis is the way that very few languages work. Python is a great example of an extremely popular, mature language that does not work this way. It is unclear that most people think that this sort of process is required for “maturity.” If this is the benchmark, then among popular languages you basically have C, C++, C#, JavaScript, and... is that it?
- zabzonk 6y agoI wouldn't say it's a benchmark, but surely Pascal, Fortran and COBOL (to name but three) are all standardised?
- steveklabnik 6y agoThere are more languages that have standards, sure, but the languages you mention, at this point, and in general, are mostly relegated to historical maintenance and maybe some very specific niches. To me personally, a “mature” language that’s not really being used isn’t the goal. And if developers truly believed standardization was valuable, you’d expect this property to give them a significant leg up against the sorts of languages like Ruby, Python, PHP, Perl, TypeScript, etc. That being said, I do think, considering it longer, there are languages that I am missing, like SQL, and ones that have a spec, even if it’s not under an ECMA/ISO process, like Java and Go, that I was forgetting. I still think that using this as a necessary condition for “maturity” is misguided.
- zabzonk 6y agoWell, I agree that standardisation and "maturity" (whatever that may mean) are not connected, but I think most C and C++ programmers (to name two very widely used languages that I personally have a lot of knowledge of) find the respective standards for those languages very helpful, and somewhat lament the lack of formal standards for other languages they may use.
- steveklabnik 6y agoYes. I do think that standardization is generally good. I am pro Rust getting a specification! I just think it is one pro among many, and not something required for success.
- moltonel3x 6y agoThe C and C++ specs are full of UB though, more like a "minimum common denominator" for compiler devs than a strict spec that users can rely on. It's way too easy to write spec-abiding code that behaves differently with different compilers/architectures/optimizations. Specs are definitely a good thing to have, but often they're just brandished as a bullet point without looking at the details: how good is the spec, what does it add over the existing tests/CI/RFCs/proofs, etc.
- IainIreland 6y agoIn a past life I worked on a COBOL compiler for IBM. There is a COBOL specification, but AFAIK nobody actually implements it fully. Implementations pick and choose new features based on customer demand. Also, COBOL is dominated by large legacy codebases, which means that if there's a discrepancy between an implementation and the specification, the users normally don't want it fixed, because they may have written code that depends on the "incorrect" behaviour and it's a lot of work to audit. IBM built a new backend for its COBOL compiler using the optimizer from their JVM. IIRC by the time I left it generated code that was ~2x faster than the old compiler, but uptake was still slow because of migration concerns. In particular, we spent a lot of time working on features to help guarantee that code with some forms of undefined behaviour would have the same result as the old version.
- turminal 6y agoThe other languages without a spec don't market themselves a C/C++ replacement or as systems languages. Having a webapp depend on a CPython implementation detail is very different from having a kernel depend on an implementation detail of a language without a spec that was used to implement it. And languages actually stack on top of each other. Imagine depending on a CPython implementation detail that depends on an implementation detail of a specific C compiler. Those things do happen and they make programmers' lives miserable sometimes, but imagine how often that would happen if C didn't have a spec that all compilers strive to implement.
- varajelle 6y agoLinux uses GCC extensions. So the Linux kernel depends on the implementation of a compiler already.
- trogdc 6y agoThose are intentional deviations from the standard, and I think there's a reasonable assumption that those stay the same/compatible from version to version. I think the other kind are a bit more problematic, and without a standard it can be difficult to tell whether your assumptions are reasonable.
- steveklabnik 6y agoSure, and people in that space do care more. But it's clearly not a blocker, even for the stuff you're talking about. It's not a hard requirement to get Rust code into Linux, for example. (Not to mention what my sibling talks about, which is very much already true.)
- pjmlp 6y agoJava, https://docs.oracle.com/javase/specs/index.html https://docs.oracle.com/javase/specs/index.html Ada, Fortran, Cobol as well. This is specially relevant in the industrial sector with certified compilers.