On 10/05/2012 10:13 AM, Niko Matsakis wrote:
That's a good point (as in const expressions).
What do you think about the iface casting form?
Fine with it. For runtime casts I'm fine with any such syntax. 13.uint()
or uint(13) or ptr::cast(foo) or anything like that.
Also worth noting though, concerning casts: we do a fair number of
raw-pointer casts in unsafe code, "foo as *c_void" and such. Possibly
solvable with a slightly more terse function like reinterpret_cast (eg.
ptr::cast), but again, it breaks const exprs that might otherwise work
via 'as'. Not sure how big a deal that is if we've given up on having
such values evaluated "really early" (pre-types). See previous message
on consts I just sent.
-Graydon
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev