I was about to say something along the lines of "yuck" but after looking at
it for a bit longer it actually doesn't look too bad.
On 24 Mar 2013 15:52, "Chris Peterson" <[email protected]> wrote:
> 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
>
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev