On Tuesday, 14 October 2014 at 09:36:34 UTC, Ola Fosheim Grøstad
wrote:
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.
Why drop down to C/C++?
It would be like saying you need to drop down to them from D.
People often write everything in C/C++ for portability, but
that is really a compiler/platform issue, not a language-design
issue.
This is what made me move away from Turbo Pascal back in the day.
If UNIX variants had a Turbo Pascal 7 or Modula-2 compatible
compilers,
I would have stayed in that world for a lot longer.
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.
C suffers from its designers not wanting to acknowledge what
other systems programmers were doing, not from BCPL design.
--
Paulo