79
C is one of the most energy saving language
(lemmy.world)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
I understand your point but come on, basic stuff has been implemented in a thousand libraries. There you go, a macro implementation
And how testable is that solution? Sure macros are helpful but testing and debugging them is a mess
I’m not saying you can’t, but it’s a lot more work to use such solutions, to say nothing about their quality compared to std solutions in other languages.
And it’s also just one example. If we bring multi-threading into it, we’re opening another can of worms where C doesn’t particularly shine.
Not sure I understand your comment on multithreading. pthreads are not very hard to use, and you have stuff like OpenMP if you want some abstraction. What about C is not ideal for multithreading?
It’s that the compiler doesn’t help you with preventing race conditions. This makes some problems so hard to solve in C that C programmers simply stay away from attempting it, because they fear the complexity involved.
It’s a variation of the same theme: Maybe a C programmer could do it too, given infinite time and skill. But in practice it’s often not feasible.
Memory management, but that impacts stability/security instead of performance.