4 ms·
The Ferrocene Language Specification
- deleted 4y ago[deleted]
- thesuperbigfrog 4y agoThe work has finally started in earnest! Rust has shown so much potential in non-safety critical systems and general-purpose computing. It is exciting to see advances in Rust toward safety critical systems work. Hats off to Ferrous Systems and AdaCore for their hard work!
- eggy 4y agoYes, I have been continuing with SPARK2014, but it may now be time to ease back into Rust as this progresses. I have grown fond of SPARK2014/Ada syntax at this point. I still find Rust a bit more complex, but I just need to spend some more time with it (I think!).
- mjw1007 4y agoThey say « It should be noted that this is not an effort to document the entire Rust language and standard library. Ferrocene is the effort to qualify a version of the Rust compiler, which means we can also be selective when it comes to what subset gets documented. » Not covering the whole library seems natural enough, but I'd be interested in finding out what part of the language they intend to cover. From the example they give, it looks like they might not be attempting to describe type inference: it repeatedly talks about types as if they're known quantities when considering an expression in isolation. In fact I wonder whether they plan to cover type checking at all. The "legality rules" section doesn't seem to think it's worth mentioning that a call which doesn't type-check isn't legal.
- UncleEntity 4y ago> In fact I wonder whether they plan to cover type checking at all. The "legality rules" section doesn't seem to think it's worth mentioning that a call which doesn't type-check isn't legal. This might be part of the ‘argument operands’ spec and it is assumed that the function call is passed legal values. I’ve read a few language specs and don’t remember any specifically mentioning the means with which the implementation is required to type check values — could be completely wrong and just don’t remember so take that as you will. Is that even a hard requirement or just something nice the compiler does to make life easier? For example, C was designed to be taken straight “off the wire” and compiled in a single stage with only keeping a symbol table around for bookkeeping. Sure, you can type check as you go but do you really have to?
- pornel 4y agoC can be done in a single pass, but I think it still requires keeping track of all types, at very least because sizeof() can take an arbitrary expression and essentially query its type. Rust boldly assumes that the code of the program will fit in RAM, which allows it to have order-independent definitions and not need prototypes. Rust implementations must do type checking (including type inference), because there's type-based method dispatch. However, Rust doesn't depend on borrow checking! The mrustc compiler is able to completely ignore lifetimes and still produce correct executables — if the input program was actually valid.