3 ms·
Isn’t a more future-proof approach to learn Rust instead? Linux kernel is incorporating Rust, and programmers often adopt open source packages written in their
by behnamoh 4y ago
Isn’t a more future-proof approach to learn Rust instead? Linux kernel is incorporating Rust, and programmers often adopt open source packages written in their favorite language. Rust being the most favorite language for 5 years in a row must say something.
- nine_k 4y agoLearning Rust is certainly useful! But C is not going to disappear, and the huge reams of important code written in it, like the Linux kernel proper, are not going away, too. But C is so much simpler than Rust, it comes almost free. It does give you an appreciation what really unsafe code is, and why is it so unsafe. It also gives you a better understanding of how the machine works on the lower level.
- lmm 4y agoIs C actually simpler than Rust? It's certainly less powerful, but it has so many weird edge cases (e.g. the integer promotion rules) that I'm not convinced it's actually easier to learn fully.
- anta40 4y ago>> But C is not going to disappear My impression too. Very unlikely that Linux and BSD kernels will be re-written in Rust.
- foul 4y agoIt may happen. It would kill both projects, because Rust is arguably future-proof in its syntax.
- Normille 4y ago>Rust is arguably future-proof in its syntax. I'm not so sure about that. Given how many people dip a tentative toe in the Rusty waters and give up, baffled by the arcane syntax, I really wouldn't be surprised if Rust-2032 bore little resemblance to Rust-2022
- the_jesus_villa 4y agoHonestly, knowing C made it much easier to understand why design decisions from Rust matter. I see Rust as kind of a (welcome) reaction to the memory model that C++ inherited from C.
- behnamoh 4y agoTo you and @nine_k: Yes, I agree with the fact that learning C makes us appreciate Rust (and other safer languages) better. It's just that between C and Rust, I would pick Rust. I'm not a systems programmer, but I have worked with C before and as soon as I saw some of Rust's example codes, I liked how it taught me something and liked the design choices. Rust does seem like a nice language.
- kirillbobyrev 4y agoI love Rust, but being the most favorite language and being an essential language to know in some sense (read, write, understand) are two different things. C is primitive and painful to program in for the most part. However, it's at the core of plenty of important things, so having enough knowledge to get around it is crucial. C is essentially a portable assembler and it's great for a number of tasks. Rust is a general-purpose programming language and it has a vastly different domain of application. Surely, they overlap, in some domains Rust is overtaking C (where C was used more out of necessity/lack of alternatives rather than consciousness). The point is, though, is that there is a domain (not necessarily very big, but very important) where C will very likely stay for a very very long time. At the same time, Rust is great, but not much critical software is written in Rust (yet). It's likely that there will be such software in the future, but I think the consensus is that nobody knows for sure.
- tmtvl 4y agoPopularity is a poor measure of a programming language's worth. Remember, there was a time Perl was popular and, an much as I love Perl, it has some issues.
- timeon 4y agoI've started learning C after I have learned Rust. Maybe not everybody needs it but once you are going to do FFI you are exposed to some C.