To reduce the number of rust keywords, I offer the lowly colon as alternative
syntax for the `as` keyword.
Today, the colon is used to add a type annotation to a variable declaration. I
think there is a nice symmetry if the colon could also be used for type cast
expressions.
With a one-line code change to parser.rs, the following code compiles as
expected:
fn main() {
// old style
let a = 1u8;
let _b: u16 = a as u16;
// new style
let a = 1: u8;
let _b: u16 = a: u16;
}
chris
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev