Re:C-rusted: The Advantages of Rust, in C, without the Disad...
by pcwalton on Monday February 20, 2023 @04:29AM
(#34866539)
I really want -> in Rust too (or perhaps .*). I don't see why such a thing would be controversial.
Re:C-rusted: The Advantages of Rust, in C, without the Disad...
by JoshTriplett on Monday February 20, 2023 @05:17PM
(#34873700)
I'm interested in seeing something like that as well. The controversy is entirely "should we spend syntax space on that" and "if so, which part of the syntax space".
There are some proposals going around that would solve that problem.
The biggest thing that is missing is a `->` operator (or the safe-rust solution of auto dereferencing with `.`, which is disabled for raw ptrs). Having to write (*foo).bar all over the place is not a good experience.
The second biggest thing that is missing is a footgun. Auto casting integer types all over the place. To different integer types. To offsets for pointers. Etc.
Disclaimer: It's been a few years since I really dug into the unsafe side of the language, maybe things have "improved"?