@nick_r_cameron So, not a struct, then.
-
-
Replying to @BRIAN_____
@nick_r_cameron The question is, does it help end-users to have unions be a special kind of struct/enum rather than its own thing. IMO, no.1 reply 0 retweets 0 likes -
Replying to @BRIAN_____
@BRIAN_____ I don't think it harms them either, and helps discourage use. Unions are intended only to make C interop easier1 reply 0 retweets 0 likes -
Replying to @nick_r_cameron
@nick_r_cameron#include <header.h> is the ultimate solution to C interop, IMO. C++ is probably too complex for that.1 reply 0 retweets 0 likes -
Replying to @BRIAN_____
@nick_r_cameron That I have to manually keep the Rust #[repr(C)] declaration of a struct in sync with the original definition is madness.2 replies 0 retweets 0 likes -
Replying to @BRIAN_____
@nick_r_cameron (And, more on topic, the same with union. Rust doesn't need its own union type if it can parse C unions.)1 reply 0 retweets 0 likes -
Replying to @BRIAN_____
@BRIAN_____ I would much rather have a tooling step, than expand Rust to understand C (even in a part).1 reply 0 retweets 0 likes -
Replying to @nick_r_cameron
@nick_r_cameron OTOH, I don't trust bindgen to do the same as GCC and clang, so I don't use it.1 reply 0 retweets 0 likes -
Replying to @BRIAN_____
@BRIAN_____ would you trust the Rust compiler to do the same? We should improve bindgen until you do trust it. Do you have specific issues?1 reply 0 retweets 0 likes -
Replying to @nick_r_cameron
@nick_r_cameron I guess bindgen! is just different syntax for#include. I guess. I'd trust it when rustc team trusts it enough to bundle it.2 replies 0 retweets 1 like
@nick_r_cameron I like, for example, how clang++ bundles its bindgen! with the compiler.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.