3 ms·
> I clearly recall when I read early rust specs Rust changed drastically before 1.0, so depending on when you read this, it may be 100% irrelevant. > namely r
by steveklabnik 4y ago
> I clearly recall when I read early rust specs
Rust changed drastically before 1.0, so depending on when you read this, it may be 100% irrelevant.
> namely removing integer promotion,
Rust does not do integer promotion.
> implicit casts
Rust does not do implicit casts (often called "coercion")
> enum
Rust's enums can do what C's enums do, but are more powerful by default, you can add arbitrary data to them, not just a synonym for some integers.
> _generic
Rust has a full generic system. Very different than _generic.
> 1 loop keyword is enough
Rust has loop for infinite loops, while, and an iterator-based for loop. There's no do/while.
> no switch
Rust has 'match', which is like a switch but extra powerful, especially when combined with features like enums.
> goto is not harmful
Rust does not have goto. It would be harmful for the kinds of static analysis Rust does. Rust does have named break though, which can do many (but not all) of the things you'd do with goto.
Additionally due to RAII and the way errors work on Rust, you don't need goto for error handling like you would in C.
> have only sized primitive types,
Not 100% sure what you mean by this.
> change extern/static
I don't know what this means.
> Hopefully, rust does not have object-orientation.
It depends on what you mean by OOP, but in general, the answer is "no". There's no classes, no inheritance. You can do dynamic dispatch, but it's fairly rare.
> But I guess, I would drop that reading if I encounter a definitive nono again.
Given what you said about destructors, that hasn't changed, so sounds like you'd stop.