Moving the kernel to modern C
Moving the kernel to modern C
Posted Feb 25, 2022 11:28 UTC (Fri) by jem (subscriber, #24231)In reply to: Moving the kernel to modern C by wtarreau
Parent article: Moving the kernel to modern C
You can add this to the list of things you hate about Rust, too. In Rust you can even do this:
fn main() {
let i = 0;
println!("{}", i); // Prints 0.
let i = i+1;
println!("{}", i); // Prints 1.
}
Note that the i variables are immutable ("const") and there are two of them. The second let introduces a new variable which is initialized with the value i+1, where i refers to the first variable.
