Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
LambdaComplex
· 5y ago · 0 comments
Wouldn't the compiler stop your second example? You're trying to assign an int16 value to b, which is now an int32.
Comments
[–]
zabzonk
5y ago
Not in C.
[–]
LambdaComplex
OP
5y ago
Sounds like this is less "explicit casts are bad" and more "explicit casts are bad in C" then. Rust indeed errors out at compile time for the reason I stated:
https://play.rust-lang.org/?version=stable&mode=debug&editio...