>
> fn push(&T[] v, T e) -> T[] {
> let T[] u = v + [e];
> ret u;
> }
>
> fn push(v: &T[], e: T) : T[] {
> let u: T[] = v + [e];
> ret u;
> }
I think your example here show's a clear advantage of consistently using
colon to distinguish types. Coming from a C background where I'm used to the
return type before the function the type, having the type behind the
function, (and after '->') which is inconsistent with the rest of the types
threw me off for a while at first. But I think making the syntax to other
type annotations makes that much clearer.
Indy
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev