3 ms·
Highlights (no particular order, partially reflects my personal interests): - Managed (GC-ed) pointers are moved to the standard library. There is no special s
by lifthrasiir 13y ago
Highlights (no particular order, partially reflects my personal interests):
- Managed (GC-ed) pointers are moved to the standard library. There is no special syntax (formerly `@`) nor special header (for vectors containing managed pointers) required.
- Special treatments on `str` and `[T]` vectors are being generalized ("Dynamically Sized Types").
- Lifetimes of temporary expressions have changed in somewhat more intuitive way.
- Syntax extensions are now exportable, documentable and much more flexible ("procedural macro").
- Language simplifications: `do` syntactic sugar is removed, `priv` is now default, no trait bounds by default (e.g. formerly `:Send` was implied for `~Trait`).
- The smart pointer usage has been improved with new `Deref` and `DerefMut` traits.
- There are now many auxiliary standard libraries instead of a single `extra` library.
- Usual library fixes, redesigns and influx took place. Most prominent change is an introduction of growable vector type, `Vec<T>`, which subsumes the original `~[T]` type.
- Rustpkg is gone, long live Cargo! Rustc has also combined many related options into umbrella flags (e.g. `-C`).
As prior point releases of Rust did, Rust 0.10 does not represent a significant milestone. It is always recommended to use the most recent development version (master) of Rust, but it had been a great undertaking to compile Rust from scratch. From 0.10 onwards, however, there are official nightly versions [1] and brave souls can play with master more conveniently now. (They are currently not signed yet, so take that in mind.)
[1] https://mail.mozilla.org/pipermail/rust-dev/2014-March/009223.html https://mail.mozilla.org/pipermail/rust-dev/2014-March/00922...
- kibwen 13y ago> Managed (GC-ed) pointers are moved to the standard library. Most uses of the old managed pointer scheme have been excised, but not all just yet (though we have people working on it with great vigor and tireless devotion). They're behind a feature flag though, so it's not possible to use them by accident. For example, note that the replacement type in question, std::gc::Gc, is still internally backed by the old managed pointers, although this will not be the case once we finally implement a proper garbage collector. And even then if you really need multiple owners of a single value we'd really prefer that you use our reference-counted pointer (std::rc::Rc) instead, along with weak pointers (std::rc::Weak) if your data has cycles. Reference counting in Rust is generally surprisingly cheap, since the refcount only gets bumped if you explicitly clone the pointer; otherwise the pointer simply gets passed around as an owned value.