|
| 1 | +Version 1.0.0-alpha (January 2015) |
| 2 | +---------------------------------- |
| 3 | + |
| 4 | + * ~2300 changes, numerous bugfixes |
| 5 | + |
| 6 | + * Highlights |
| 7 | + |
| 8 | + * The language itself is considered feature complete for 1.0, |
| 9 | + though there is a significant amount of cleanup and bugfixes |
| 10 | + remaining. |
| 11 | + * Nearly 50% of the public API surface of the standard library has |
| 12 | + been declared 'stable'. Those interfaces will not change. |
| 13 | + * Most crates that are not `std` have been moved out of the Rust |
| 14 | + distribution into the Cargo ecosystem so they can evolve |
| 15 | + separately and don't need to be stabilized as quickly, including |
| 16 | + 'time', 'getopts', 'num', 'regex', and 'term'. |
| 17 | + * Documentation continues to be expanded with more guides, more |
| 18 | + API coverage and more examples. |
| 19 | + * All official Rust binary installers now come with [Cargo], the |
| 20 | + Rust package manager. |
| 21 | + |
| 22 | +* Language |
| 23 | + |
| 24 | + * Closures have been [completely redesigned][unboxed] to be |
| 25 | + implemented in terms of traits, can now be used as generic type |
| 26 | + bounds and thus monomorphized and inlined, or via an opaque |
| 27 | + pointer (boxed) as in the old system. The new system is often |
| 28 | + referred to as 'unboxed' closures. |
| 29 | + * Enum variants are [namespaced by their type names][enum]. |
| 30 | + * [`where` clauses][where] provide a more versatile and attractive |
| 31 | + syntax for specifying generic bounds, though the previous syntax |
| 32 | + remains valid. |
| 33 | + * Rust again picks a [fallback] (either i32 or f64) for uninferred |
| 34 | + numeric types. |
| 35 | + * Rust [no longer has a runtime][rt] of any description, and only |
| 36 | + supports OS threads, not green threads. |
| 37 | + * At long last, Rust has been overhauled for 'dynamically-sized |
| 38 | + types' ([DST]), which integrates 'fat pointers' (object types, |
| 39 | + arrays, and `str`) more deeply into the type system, making it |
| 40 | + more consistent. |
| 41 | + * Rust now has a general [range syntax][range], `i..j`, `i..`, and |
| 42 | + `..j` that produce range types and which, when combined with the |
| 43 | + `Index` operator and multitispatch, leads to a convenient slice |
| 44 | + notation, `[i..j]`. |
| 45 | + * The new range syntax revealed an ambiguity in the fixed-length |
| 46 | + array syntax, so now fixed length arrays [are written `[T; |
| 47 | + N]`][arrays]. |
| 48 | + * The `Copy` trait is no longer implemented automatically. Unsafe |
| 49 | + pointers no longer implement `Sync` and `Send` so types |
| 50 | + containing them don't automatically either. `Sync` and `Send` |
| 51 | + are now 'unsafe traits' so one can "forcibly" implement them via |
| 52 | + `unsafe impl` if a type confirms to the requirements for them |
| 53 | + even though the internals do not (e.g. structs containing unsafe |
| 54 | + pointers like `Arc`). These changes are intended to prevent some |
| 55 | + footguns and are collectively known as [opt-in built-in |
| 56 | + traits][oibit] (though `Sync` and `Share` will soon become pure |
| 57 | + library types unknown to the compiler). |
| 58 | + * Operator traits now take their operands [by value][ops], and |
| 59 | + comparison traits can use multidispatch to compare one type |
| 60 | + against multiple other types, allowing e.g. `String` to be |
| 61 | + compared with `&str`. |
| 62 | + * `if let` and `while let` are no longer feature-gated. |
| 63 | + * Rust has adopted a more [uniform syntax for escaping unicode |
| 64 | + characters][unicode]. |
| 65 | + * `macro_rules!` [has been declared stable][mac]. Though it is a |
| 66 | + flawed system it is sufficiently popular that it must be usable |
| 67 | + for 1.0. Effort has gone into future-proofing it in ways that |
| 68 | + will allow other macro systems to be developed in parallel, and |
| 69 | + won't otherwise impact the evolution of the language. |
| 70 | + * The prelude has been [pared back significantly][prelude] such |
| 71 | + that it is the minimum necessary to support the most pervasive |
| 72 | + code patterns, and through [generalized where clauses][where] |
| 73 | + many of the prelude extension traits have been consolidated. |
| 74 | + * Rust's rudimentary reflection [has been removed][refl], as it |
| 75 | + incurred too much code generation for little benefit. |
| 76 | + * [Struct variants][structvars] are no longer feature-gated. |
| 77 | + * Trait bounds can be [polymorphic over lifetimes][hrtb]. Also |
| 78 | + known as 'higher-ranked trait bounds', this crucially allows |
| 79 | + unboxed closures to work. |
| 80 | + * Macros invocations surrounded by parens or square brackets and |
| 81 | + not terminated by a semicolon are [parsed as |
| 82 | + expressions][macros], which makes expressions like `vec![1i32, |
| 83 | + 2, 3].len()` work as expected. |
| 84 | + * Trait objects now implement their traits automatically. |
| 85 | + * Automatically deriving traits is now done with `#[derive(...)]` |
| 86 | + not `#[deriving(...)]` for [consistency with other naming |
| 87 | + conventions][derive]. |
| 88 | + * Importing the containing module at the same time as items it |
| 89 | + contains is [now done with `self` instead of `mod`][self], as in |
| 90 | + use `foo::{self, bar}` |
| 91 | + |
| 92 | +* Libraries |
| 93 | + |
| 94 | + * A [series][coll1] of [efforts][coll2] to establish |
| 95 | + [conventions][coll3] for collections types has resulted in API |
| 96 | + improvements throughout the standard library. |
| 97 | + * New [APIs for error handling][err] provide ergonomic interop |
| 98 | + between error types, and [new conventions][err-conv] describe |
| 99 | + more clearly the recommended error handling strategies in Rust. |
| 100 | + * The `fail!` macro has been renamed to [`panic!`][panic] so that |
| 101 | + it is easier to discuss failure in the context of error handling |
| 102 | + without making clarifications as to whether you are referring to |
| 103 | + the 'fail' macro or failure more generally. |
| 104 | + * On Linux, `OsRng` prefers the new, more reliable `getrandom' |
| 105 | + syscall when available. |
| 106 | + * The 'serialize' crate has been renamed 'rustc-serialize' and |
| 107 | + moved out of the distribution to Cargo. Although it is widely |
| 108 | + used now, it is expected to be superceded in the near future. |
| 109 | + * The `Show` formatter, typically implemented with |
| 110 | + `#[derive(Show)]` is [now requested with the `{:?}` |
| 111 | + specifier][show] and is intended for use by all types, for uses |
| 112 | + such as `println!` debugging. The new `String` formatter must be |
| 113 | + implemented by hand, uses the `{}` specifier, and is intended |
| 114 | + for full-fidelity conversions of things that can logically be |
| 115 | + represented as strings. |
| 116 | + |
| 117 | +* Tooling |
| 118 | + |
| 119 | + * [Flexible target specification][flex] allows rustc's code |
| 120 | + generation to be configured to support otherwise-unsupported |
| 121 | + platforms. |
| 122 | + * Rust comes with rust-gdb and rust-lldb scripts that launch their |
| 123 | + respective debuggers with Rust-appropriate pretty-printing. |
| 124 | + * The Windows installation of Rust is distributed with the the |
| 125 | + MinGW components currently required to link binaries on that |
| 126 | + platform. |
| 127 | + |
| 128 | +* Misc |
| 129 | + |
| 130 | + * Nullable enum optimizations have been extended to more types so |
| 131 | + that e.g. `Option<Vec<T>>` and `Option<String>` take up no more |
| 132 | + space than the inner types themselves. |
| 133 | + * Work has begun on supporting AArch64. |
| 134 | + |
| 135 | +[Cargo]: https://crates.io |
| 136 | +[unboxed]: https://github.com/rust-lang/rfcs/blob/master/text/0114-closures.md |
| 137 | +[enum]: https://github.com/rust-lang/rfcs/blob/master/text/0390-enum-namespacing.md |
| 138 | +[flex]: https://github.com/rust-lang/rfcs/blob/master/text/0131-target-specification.md |
| 139 | +[err]: https://github.com/rust-lang/rfcs/blob/master/text/0201-error-chaining.md |
| 140 | +[err-conv]: https://github.com/rust-lang/rfcs/blob/master/text/0236-error-conventions.md |
| 141 | +[rt]: https://github.com/rust-lang/rfcs/blob/master/text/0230-remove-runtime.md |
| 142 | +[mac]: https://github.com/rust-lang/rfcs/blob/master/text/0453-macro-reform.md |
| 143 | +[DST]: http://smallcultfollowing.com/babysteps/blog/2014/01/05/dst-take-5/ |
| 144 | +[coll1]: https://github.com/rust-lang/rfcs/blob/master/text/0235-collections-conventions.md |
| 145 | +[coll2]: https://github.com/rust-lang/rfcs/blob/master/text/0509-collections-reform-part-2.md |
| 146 | +[coll3]: https://github.com/rust-lang/rfcs/blob/master/text/0216-collection-views.md |
| 147 | +[ops]: https://github.com/rust-lang/rfcs/blob/master/text/0439-cmp-ops-reform.md |
| 148 | +[prelude]: https://github.com/rust-lang/rfcs/blob/master/text/0503-prelude-stabilization.md |
| 149 | +[where]: https://github.com/rust-lang/rfcs/blob/master/text/0135-where.md |
| 150 | +[refl]: https://github.com/rust-lang/rfcs/blob/master/text/0379-remove-reflection.md |
| 151 | +[panic]: https://github.com/rust-lang/rfcs/blob/master/text/0221-panic.md |
| 152 | +[structvars]: https://github.com/rust-lang/rfcs/blob/master/text/0418-struct-variants.md |
| 153 | +[hrtb]: https://github.com/rust-lang/rfcs/blob/master/text/0387-higher-ranked-trait-bounds.md |
| 154 | +[unicode]: https://github.com/rust-lang/rfcs/blob/master/text/0446-es6-unicode-escapes.md |
| 155 | +[oibit]: https://github.com/rust-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md |
| 156 | +[macros]: https://github.com/rust-lang/rfcs/blob/master/text/0378-expr-macros.md |
| 157 | +[range]: https://github.com/rust-lang/rfcs/blob/master/text/0439-cmp-ops-reform.md#indexing-and-slicing |
| 158 | +[arrays]: https://github.com/rust-lang/rfcs/blob/master/text/0520-new-array-repeat-syntax.md |
| 159 | +[show]: https://github.com/rust-lang/rfcs/blob/master/text/0504-show-stabilization.md |
| 160 | +[derive]: https://github.com/rust-lang/rfcs/blob/master/text/0534-deriving2derive.md |
| 161 | +[self]: https://github.com/rust-lang/rfcs/blob/master/text/0532-self-in-use.md |
| 162 | +[fallback]: https://github.com/rust-lang/rfcs/blob/master/text/0212-restore-int-fallback.md |
| 163 | + |
1 | 164 | Version 0.12.0 (October 2014)
|
2 | 165 | -----------------------------
|
3 | 166 |
|
|
0 commit comments