On 07/15/2012 05:15 PM, Patrick Walton wrote:
2. Function types, trait types, and vector types without a fixed size are *second-class* types. Because their sizes aren't known to the compiler, they can't be referred to in isolation; they can only be referred to with a pointer. Any of the three pointer types will do.
Yes! Speaking as a relative newcomer (I've dabbled in Rust off and on, but never felt like I understood the type system sufficiently), I think this shift in terminology is a significant improvement. It make it feel like there are far fewer things to remember. Just reading the proposal was like a small epiphany.
One bit of syntax still seems tricky. If "unique pointer to T" is spelled ~T then it seems like the special case "unique pointer to fn()" should be spelled ~fn() instead of fn~(). I don't know whether this can be changed without causing other problems for the grammar. If it can, it would make things that much easier to remember (for me, at least).
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
