5 ms·
You may want to re-read roblabla's post. The Rust team has never promised that they will never break existing code, since that would lock them into a situation
by jmillikin 4y ago
You may want to re-read roblabla's post.
The Rust team has never promised that they will never break existing code, since that would lock them into a situation similar to C/C++. Making occasional rare changes that break working code (but for which it's possible to write code that works in both versions) is not "willy nilly".
For example, the following compiles with the current stable version (1.63.0):
use std::ffi::*;
mod my_ffi {
pub type c_char = u8;
}
use my_ffi::*;
fn main() {
println!("c_char is {} bytes", std::mem::size_of::<c_char>());
}
But it will break when 1.64.0 is released, because then `c_char` would become ambiguous.
- pjmlp 4y agoC and C++ do have enough breaking changes. Dropping K&R C syntax, exception specifications, auto_ptr,....