4 ms·
the syntax implicit expensive free is the same issue than the syntax implicit expensive allocation. I clearly recall when I read early rust specs that I did not
by sylware 4y ago
the syntax implicit expensive free is the same issue than the syntax implicit expensive allocation. I clearly recall when I read early rust specs that I did not want that (and more).
Additionally, I wonder if they fixed the other C issues, namely removing integer promotion, implicit casts (but different explicit casts for compile-time and runtime), enum, _generic, typeof, 1 loop keyword is enough, no switch, goto is not harmful, have only sized primitive types, change extern/static... Hopefully, rust does not have object-orientation.
And you can bet, you will find a bunch of sickos not writting simple and core rust for linux... but rust with tons of extensions only in 1 or 2 compilers like the "C" from linux which is actually the C from gcc and nothing else (clang and icc playing catchup).
I should re-read the language syntax specs though. But I guess, I would drop that reading if I encounter a definitive nono again.
- 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.