22 ms·
>C is so tiny that if you're going to write anything non-trivial you ... pretty much know exactly how you're going to write it from the start. Since C is so co
by 0x09 13y ago
>C is so tiny that if you're going to write anything non-trivial you ...
pretty much know exactly how you're going to write it from the start. Since C is so constrained it's very easy to design for, and you usually have a very clear idea of what you are getting into, even if that includes reimplementing a common data structure or using external libraries. And if you are using an external library, the API is not likely to surprise you. There are countlessly fewer ways to design something within the rules of the language in C than C++. Different people will see this as a blessing or a curse.
For some situations it just makes sense. If your program revolves heavily around C libraries you will likely be forced into a C-like design anyway. And likewise, if you are designing a library with a primary interface in C. If you are already coding in this style, C offers some niceities to (ab)use that C++ doesn't (especially compound literals, designated initializers, and VLAs).
It's easy to become familiar with C which makes it easy for C to be a go-to language (obviously this depends on your problem space.)