3 ms·
I feel like C is somewhat manageable on microcontrollers. Programs tend to be smaller (micro!), you can often do static allocation which mitigates a lot of the
by nicoburns 4y ago
I feel like C is somewhat manageable on microcontrollers. Programs tend to be smaller (micro!), you can often do static allocation which mitigates a lot of the memory management issues, and you're also often dealing with simple types and bit manipulation which is where C shines.
In larger programs on full-fat operating systems, programs tend to be much larger (esp. if you include libraries - dealing with libraries being one of the most complex things in C), and you have to deal with sophisticated allocation patterns, and complex types (webs of pointers), abstractions and business logic which is where C basically leaves you on your own and provides very little in terms of structure or guard rails.
- voidhorse 4y agoThis is how I’ve started to think about things too. If every program was authored by a single individual and was relatively small, C would already be the perfect programming language. All the advanced safety features of competitors really only become relevant once you introduce scale.
- FpUser 4y agoGenerally I agree with everything you say. Each tool has areas where it shines and the opposite. One of the reasons I use multiple languages.