← Back to context

Comment by Panzerschrek

7 days ago

It's just an excuse not to use safe languages. And adopting it isn't that easy - one need to learn how the new library works or even rewrite old working and tested code with it.

This is a tragically misguided view. There are tons of code bases that aren't going to be rewritten in safe languages for various reasons, be it political or technical. You may or may not agree with those reasons, and you may or may not like that these code bases are important, but the fact remains that these projects exist. Giving them a toolset to adopt a broad set of bounds-safe behavior can only be a good thing.

If i cannot use GCC i cannot compile to half the embedded platforms i work with on a daily basis.

C remains widespread for unique reasons that not many other languages actually quite grasp.

Using C for a destop application should probably stop being done in light of many more languages more suited for the domain.

But there is no replacement for C in hard embedded systems. And there is no replacement for C in the massive domain of legacy c systems.

  • It's not an excuse to write C forever, only because some embedded platforms have poor support in compilers other than GCC. Embedded developers should do something to force embedded vendors providing something better than a GCC fork or even something more obscure.

  • Good thing there are safe languages that compile to C, such as Nim.

    • These kind of effort have potential in my eyes. I've seen some others, and been tempted to write some tools of my own of this type.

      I personally struggle with often being stuck on c99, not even c11.