Hacker News new | past | comments | ask | show | jobs | submit login

Oh, and "undefined behavior" has effectively the same definition in Rust and in C and C++. There's wording differences:

C/C++: behavior for which this document imposes no requirements

Rust: is not bound by any specification

But that's just a wording difference, not a semantic difference.

There are some instances where Rust and C/C++ use similar words to mean different things, but that's also changed over time. For example, Rust used to use rvalue and lvalue, but has moved to

"place expression", defined as "lvalue" in C and "glvalue" in C++

"value expression", defined as "rvalue" in C and "prvalue" in C++

The only reason to not use the C++ terms here is that these are the only two value categories in Rust, and it's unlikely to need all of the other three that C++ has.

You're not wrong that there's stuff called the same but has different meanings, for example, "reference," but what can you do.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: