3 ms·
Rust is certainly interesting but it's very new and it still has a way to go to achieve the breadth of hardware support it needs to replace C/C++. C is a thin
by Renaud 10y ago
Rust is certainly interesting but it's very new and it still has a way to go to achieve the breadth of hardware support it needs to replace C/C++.
C is a thin layer over hardware. There is a reason it hasn't yet been replaced despite waves of new, safer, more powerful paradigms and languages.
While its hold has (thankfully) been eroded for the higher-levels of abstraction needed in user-facing apps today, C/C++ are still king on low-level hardware because there is basically little to no overhead compared to any other safe language.
If you need to get your code on a 8/16/24 and even most 32 bits microcontrollers, there is not a lot of choice.
Maybe Rust will eventually have enough backends, debugging tools and hardware vendor support on all theses 1000s of platforms to offer a compelling alternative, but it's disingenuous to claim you have to be a historian to study C when it's still one of the most used languages today and virtually all the hardware you own has most -if not all- of its code written in C/C++.
Rust may not be able to replace all of C's niches. It will -and I hope it does- replace C/C++ in many areas of development, but it's premature to call for the death of C when the alternative is still in its infancy.
You should definitely study C, then Rust and use what your place of work will let you use because most of the time, it's not your decision anyway.
- lmm 10y ago> C is a thin layer over hardware. There is a reason it hasn't yet been replaced despite waves of new, safer, more powerful paradigms and languages. C has already been replaced in what would have been the vast majority of its use cases 20-30 years ago, especially if we're talking about new code. At this point it's mainly alive due to inertia. > If you need to get your code on a 8/16/24 and even most 32 bits microcontrollers, there is not a lot of choice. Rust is starting to get some microcontroller support. And in many cases the business case has shifted away from true microcontrollers - there's no longer much or any price advantage over a proper ARM (for example), battery technology is getting better all the time... > virtually all the hardware you own has most -if not all- of its code written in C/C++. I don't think that's true these days. My phone is running a certain amount of C in its low-level OS, sure, but that will be dwarfed by the amount of userspace code it's running that's written in Java or similar.