Source

Thread

1/ @vkrajacic

Reasons I use C:

  • It’s a small and simple language.
  • It’s stable and changes infrequently.
  • It provides low-level, manual memory management.
  • I can see actual CPU instructions.
  • It has a decades-old development ecosystem.
  • It works everywhere.
  • It allows for direct interaction with major operating systems, which expose low-level APIs in C or C++.
  • I want my code to remain runnable 10-20 years from now.

Not the reasons I use C:

  • Because I believe it’s perfect.
  • Because I’m a “fan” of it.
  • Because I think it has all the features I need.

I write in C because I believe it’s still the best choice for developing native applications (not just embedded software). This conveys a lot about my sentiments towards other languages, including C++, C#, Rust etc.

New is not always better.

2/ @simplex_fx

@vkrajacic

however, you CAN write almost all the features not present in them, if needed :D

3/ @vkrajacic

Yes, I had to write a fair amount of “base” code, such as memory primitives, UTF-8 length-based strings, math, UI, etc. However, once you have these components in place, it’s much better than using higher-level languages with numerous libraries that you might not fully comprehend.

4/ @thembeddevguy

@vkrajacic @simplex_fx

That’s the task of a standard library. It’s a shame and not a feature if all of these must be written. It’s not a must to include stdio or any standard lib and you can use your custom libs. That’s why I’m shifting to golang, really feels like the modern C we need so far.

5/ @rfleury

@thembeddevguy @vkrajacic @simplex_fx

The weird thing about this argument is that it somehow presupposes that a new language & toolchain was necessary for a new standard library. Neither are necessary. If you want a new standard library, make one. It doesn’t need to be standardized at the programming language level.

6/ @thembeddevguy

@rfleury @vkrajacic @simplex_fx

A standard library for me always was a “here are super common tasks and no one shall “solve” that over and over again, here, have a reviewed and tested solution, go focus on the important parts” thing. Relying on 3rd party stuff is exactly the opposite of this.

Branches: 2023-10-10-thembeddevguy-i-would-trust-a-builtin-solution-1000-times-more