On Tuesday, 14 October 2014 at 08:00:21 UTC, Dicebot wrote:
large code base. I am not even speaking about algorithms in STL
or std.algorithm sense but much more routine things - common
small snippets that either get copy-pasted or hidden behind C
macros.
C has macros to compensate for deficiencies in the language.
What kind of routine things are you thinking about that cannot be
covered either by better features or by explicit inlining?
Probably when you say "low level" you imagine something like
embedded microcontrollers. But there quite many huge scale
I am thinking about the stuff where it makes sense to drop down
to C/C++ due to the nature of the problem.
For most applications it makes more sense to write the high level
stuff in a high level language such as Objective-C/Swift and drop
down to C/C++ for engine level stuff.
People often write everything in C/C++ for portability, but that
is really a compiler/platform issue, not a language-design issue.
systems out there too, sometimes reaching millions lines of C
code. And those struggle from minimal C abstraction
capabilities.
Or they struggle with C not having the right feature set. Sure,
with templates you can implement more convenient ref-counting and
unique-pointers, and you can get a little bit more type safety.
But C suffers from the simple design of BCPL which was a bare
bones version of CPL.