4 ms·
This seems more like the disadvantages rust, with the disadvantages of C. What I really want is the footguns of C with the ergonomic modern veneer of Rust's nic
by EamonnMR 4y ago
This seems more like the disadvantages rust, with the disadvantages of C. What I really want is the footguns of C with the ergonomic modern veneer of Rust's nicer syntax, built-in types, control structures etc.
- faisal_ksa 4y agoMaybe Zig[1]? [1]: https://ziglang.org/ https://ziglang.org/
- EamonnMR 4y agoI'm still waiting on a Zig book.
- JoshTriplett 4y ago> What I really want is the footguns of C with the ergonomic modern veneer of Rust's nicer syntax, built-in types, control structures etc Would unsafe Rust work for that, or is there a C footgun you need that that doesn't provide?
- gpm 4y agoUsing unsafe rust to try and write "rust without safety" doesn't work particularly well IMHO. Arguably that's a feature, unsafe rust is meant for implementing things that you couldn't implement in safe rust, not meant for just wholesale avoiding the borrow checker and going on with your life. 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"?
- pcwalton 4y agoI really want -> in Rust too (or perhaps .*). I don't see why such a thing would be controversial.
- JoshTriplett 4y agoI'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.