Rust: Not So Great For Codec Implementing
&gt; And that’s why C is still the best language for systems programming—it still lets you to do what you mean (the problem is that most programmers don’t really know what they mean)<p>Honestly after a ~1yr of embedded C co-op&#x2F;intership experience, I&#x27;m familiar enough but not too entrenched to say that C is not that great for embedded&#x2F;systems. When you&#x27;re dealing at the hardware architecture level you need more detail than C (or any PL) can reasonably provide.<p>C doesn&#x27;t &quot;let you do what you mean&quot;, it has no knowledge of special registers, interrupts, timers, DMA, etc. Companies have coped with a slew of macros that are just ugly to write with and make testing much more difficult than need be. If the language had actual support for embedded you&#x27;d see support for architecture strictly as libraries (which may be possible in C but certainly not ergonomic or supported by the culture around the language). Library architectures would make writing simulators and embedded unit tests __MUCH__ simpler.<p>Not to mention the minefield that is the undefined sections of the C spec. A lot of people &quot;mean&quot; for an integer to rollover, but that&#x27;s undefined and the C spec doesn&#x27;t care about what you &quot;mean&quot;. [1]<p>Just today I meant for a constant lookup table not to be overwritten by the stack (I had plenty of unused RAM), but unfortunately C doesn&#x27;t care what I meant. I had to dig around and find an odd macro to jam that data into program space--effectively hiring some muscle (gcc) to break the spec so it behaved the way I wanted. [2] I run into this sort of thing all the time. I know the C spec. I know my hardware. C doesn&#x27;t care and needs to be beaten up. The only real benefit of C in these situations is that it&#x27;s a huge sissy and people are really good at beating the piss out of it now.<p>I&#x27;m not very familiar with rust, but if it makes an honest effort to be ergonomic for embedded (might need to be forked). It will eventually crush C.<p>[1]: <a href="https:&#x2F;&#x2F;blog.regehr.org&#x2F;archives&#x2F;213" rel="nofollow">https:&#x2F;&#x2F;blog.regehr.org&#x2F;archives&#x2F;213</a>
[2]: <a href="https:&#x2F;&#x2F;gcc.gnu.org&#x2F;onlinedocs&#x2F;gcc-4.8.5&#x2F;gcc&#x2F;Named-Address-Spaces.html" rel="nofollow">https:&#x2F;&#x2F;gcc.gnu.org&#x2F;onlinedocs&#x2F;gcc-4.8.5&#x2F;gcc&#x2F;Named-Address-S...</a>