6 ms·
One advantage is it forces the language to articulate standards instead of the implementation defining the feature set. Standards tend to give stability and lon
by sicp-enjoyer 4y ago
One advantage is it forces the language to articulate standards instead of the implementation defining the feature set. Standards tend to give stability and longevity to the language, as well as making it possible to write new compilers and make it more portable.
- charcircuit 4y agoThat sounds a little circular. The benefit of alternate compilers is that it makes making alternate compilers easier. For stability compilers already have a large incentive not to break old programs. For longevity I don't really see how a standard affects it that much. For being more portable you do not need an entirely knew compiler.
- trimir2022 4y agoBeing able to specify a language outside an implementation is extremely useful to prevent hidden logical inconsistencies between different parts of the language, and makes the language more robust. It also allows people to design new backends (looking at CUDA LLVM backends)by finding out the right abstraction to support performance. For example, implementing a C or C++ compatible CUDA backend required the C++ committee to make changes to the memory model / consistency guarantees of C++ atomics. If C or C++ had only depended on compiler implementation for it, then there would have just been different implementations with different guarantees with no consistencies between them, and no single way to even define why they were different.
- pjmlp 4y agoActually it was the other way around, CUDA was fixed to follow C++11 memory model. There are a couple of CppCon talks on the subject.
- trimir2022 4y agoPartially correct, even now, SG1 in C++ fixes a lot of things in C++ specification to allow for CUDA like approaches.
- not2b 4y agoThe reason it isn't circular is that if there is one implementation, even with good documentation, there will inevitably be lots of corner cases where the implementation does something, but it isn't written down anywhere. Independent implementations will discover many of these issues and they get clarified as part of the standards process. So you can't really produce a high quality standard with only one implementation. You'll miss important details.
- deleted 4y ago[deleted]
- xiphias2 4y agoRust is ,,A language empowering everyone to build reliable and efficient software.'' (from the home page) Reliability at the extremes (where it may be even life or death situation) requires the developer knowing what the program (s)he is writing exactly expresses in Rust.
- charcircuit 4y ago>requires the developer knowing what the program (s)he is writing exactly expresses in Rust. That just need documentation. You don't need a standard for that.
- melony 4y agoAh, a Lisp user. Common Lisp is Exhibit A for standardization. Every Lisp user claims it is great because of either standardization of advanced features in the days when the Berlin Wall has barely fallen or the mere existence of macros. No real first-party improvement to the language in almost three decades after ANSI standardisation. Massive fragmentation in the compiler ecosystem, rarely do libraries work out of the box on non-SBCL tooling. Yes, I can definitely see the advantage of standardization now, very much so.
- ithkuil 4y agoWhy do libraries not work across compilers of the compilers are implementing a standard? Are they perhaps not really implementing a standard?
- steveklabnik 4y agoSimply having a document called "a standard" doesn't mean that: 1. the standard covers everything you wished it would cover 2. every implementation implements the standard, with no bugs 3. the standard doesn't itself contain incoherent or contradictory things Standards are a tool, not magic interoperability sauce.
- pjmlp 4y agoHence the existence of standard certification for compilers as business.
- tialaramex 4y agoLike the Goldman Rep says in The Big Short, "If you offer us free money, we ARE going to take it..."
- pjmlp 4y agoI bet Ferrocene will also happily take part of that money.