Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Undefined Behavior in 2017. Parent comment
I emphasized "intended" because it seems like we're talking past each other.
You: re-emphasizing Rust's specified design goal.
Me: emphasizing the current state of Rust compiler as reality which makes the statement "safe Rust has no undefined behavior" as not true.
(In other words, I emphasize the unintentional UB whereas you do not.)
>, because your conditional is equivalent to saying "if you write valid code".
If you look at the github issue, "1.04E+17 as u8" is valid safe Rust code which invokes UB.
There are no comments on this comment yet.
I emphasized "intended" because it seems like we're talking past each other.
You: re-emphasizing Rust's specified design goal.
Me: emphasizing the current state of Rust compiler as reality which makes the statement "safe Rust has no undefined behavior" as not true.
(In other words, I emphasize the unintentional UB whereas you do not.)
>, because your conditional is equivalent to saying "if you write valid code".
If you look at the github issue, "1.04E+17 as u8" is valid safe Rust code which invokes UB.