3 ms·
IMHO, Rust is not the new C, perhaps D or Zig could be the new C. Rust is the hardest language i failed to learn and eventually gave up. C is one of the easiest
by pankajdoharey 7y ago
IMHO, Rust is not the new C, perhaps D or Zig could be the new C. Rust is the hardest language i failed to learn and eventually gave up. C is one of the easiest language to learn but difficult to master.
Edit: Rust libs can be used to interface with C, but so could other languages. Porting the huge amounts of system software is near impossible task.
- deleted 7y ago[deleted]
- buybackoff 7y agoIn that exercise Rust is compared with C from zero cost C ABI point of view. Rust could replace C for shared libraries. Other languages could work with Rust cdylibs as if those libs were written in C. But as the language, Rust features such as safety are good. I did not intend to compare the languages, but the use case of shared libs with C ABI. Also the title has "as", not "is", and that word choice is very intentional and not accidental.
- galangalalgol 7y agothe people that seem to have the least trouble with rust are coming from ocaml or f#. if your c++ style is highly imperative it seems to beat you up until you quit or figure out the patterns it prefers the prefers is the hard part, because it isn't wrong it just isn't a well supported style. I am concerned about the amount of syntax rust has accumulated. if I play in my subset I'm fine but I often find supposedly idiomatic rust that looks like an entirely different language to what I write
- cyphar 7y agoWith C it might be easy to get a program to compile, with Rust it's easy to be sure that a compiled program is actually correct from a memory safety PoV. Rust is harder to learn, but much easier to master. I guarantee the vast majority of systems programmers writing C code are not masters in the sense that they will write memory-unsafe code regularly. Personally I think Rust is competing with C (and C++ as well as Go) in the "systems programming" sphere. It isn't a competitor to C's "portable assembly" history. It's a far more FP-esque approach to systems programming.