3 ms·
It's true that embedded software doesn't need to be written in C but if you're distributing a _library_ that's aimed at embedded systems then C is still a terri
by dljsjr 8y ago
It's true that embedded software doesn't need to be written in C but if you're distributing a _library_ that's aimed at embedded systems then C is still a terrific choice for a ton of reasons. The goal of a library should be to embrace the path of least resistance for adoption. And when you're working in the embedded space that means targeting the least common denominator. Are all embedded systems extremely resource constrained? No, but many are. Do all applications running on embedded platforms need to be real-time? No, but many do.
Writing in C means you can get small binaries, with minimal runtimes, easy control over things like memory allocation, and if you want to use the library you don't have to write C because almost any language with any form of FFI is going to target C before it targets C++.