| Interesting idea. I'm
generally in favor of moving things out of the core language. What
makes me hesitate a bit here is that it would be nice if one could
translate C types into Rust types that are then
representation-compatible so as to ease interoperability. If we take
this proposal, any C enum would have to be translated into a Rust type
that uses an integer instead of an enum. This means that you'd have to
"cast from" this integer any time you wanted to use the relevant field.
Of course, maybe that's better, particularly since some uses of C enums
(like bitsets) can't be accommodated by Rust enums. One correction, though: I believe that, today, you can cast to any numeric type, not only ints. Niko
|
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev

