3 ms·
In 2022, is there any other reasons to use C besides "fast code" or "codebase already written in C"?
by knodi123 4y ago
In 2022, is there any other reasons to use C besides "fast code" or "codebase already written in C"?
- wnoise 4y ago"codebase already written in C" includes both "all the as yet unwrapped libraries" and "the OS interface".
- bluecalm 4y agoThere isn't. Fast code is pretty important though to a lot of people while security isn't (games, renderers, various solvers, simulations etc.). It's great C is available for that. If you're ok with slow use Java or whatever.
- int_19h 4y agoNo, and, in fact, the first one isn't valid - you can use C++ (or a subset of it) for the same performance profile with less footguns. So really the only time to use C is when the codebase already has it and there is a policy to stick to it even for new code, or when targeting a platform that simply doesn't have a C++ toolchain for it, which is unfortunately not uncommon in embedded.