3 ms·
If he really wanted to, he could take a look at the Consolidated Ada 2012 Language Reference Manual [1] and get his mind blown. Don't get me wrong - I'm not cl
by jonathanstrange 8y ago
If he really wanted to, he could take a look at the Consolidated Ada 2012 Language Reference Manual [1] and get his mind blown.
Don't get me wrong - I'm not claiming the reference manual is a good learning source, for that I would recommend Barnes's book, but that it's an example of a language specification. Having precise specs is a minimum requirement for a safe language. Rust is too complicated as a C replacement but arguably a good C++ replacement. Unfortunately, it's not well-defined (yet) for writing safe programs. Without spec you cannot even tell compiler bugs from intended behaviour.
[1] http://www.ada-auth.org/standards/ada12_w_tc1.html http://www.ada-auth.org/standards/ada12_w_tc1.html
- steveklabnik 8y agoI am planning on looking into more reference material eventually, but I prefer to do that after reading tutorials and writing code, as a way to answer the questions that I have. And yes, the lack of a spec is a weakness in Rust. We've been working on it for a while, and are gonna push it even harder this year. > Without spec you cannot even tell compiler bugs from intended behaviour. So this is true, but it's also a bit more subtle than that. For example, "there should be no undefined behavior in safe Rust" is a design principle that, while we don't have a spec, can say if something is a bug or not. (And we do have a few of those bugs.) This is, of course, not as good as a full spec, but guiding principles can really help.