Hello Kevin,

I would say these are the technical merits of C that get it chosen
these days:

1. The new code they're writing will be part of a large body of
existing C code which they don't have time, permission, or inclination
to convert to C++.

Probably the most common reason that C is used (OTOH I'm not sure that counts as "choose" rather than just used)


2. They need to be aware of every tiny low level detail anyway, so
having the language do too many things "for you" is not the desired
approach (security, O/S and embedded work).

Nod.


3. C has a real ABI on almost every platform; therefore, C is chosen
for most inter-language work such as writing python modules.


Nod.

But some people really *are* choosing C for aesthetics.  Linus
Torvalds, bless his little world dominating heart, chose C for a
normal app (git), and he cited that the existence of operator
overloading in C++ is bad because it hides information -- e.g. in the
general case you "never know what an expression is actually doing."

Is that choosing C or getting stuck with it after removing the non-options?


I think this can be seen as mainly an aesthetic choice.  Avoiding a
language because it *supports* information hiding (which is what I
think operator overloading is) is not really an 'economic' tradeoff,
since you could choose not to hide information by not using those
features.  He'd just rather not be in the vicinity of language
features that make those kinds of choices because they seem wrong to
him (and because he wants to keep C++ies out of his code I think.)

I considered citing Linus as the counter example... but there are also people who LIKE assembler so I think we should stick to the other 99%.


Some people want their language to have a "WYSIWYG" relationship with
the generated assembler code (if I'm right, it does seem consistent
with him being an OS developer).

I also know some scientists and mathematicians who use C rather than
C++.  I think the reason is that by using a simpler language they can
know everything about the language.  I think the sooner they can 'get
the computer science stuff out of the way', the sooner they can focus
on what they see as the domain issues.  (I think once the program gets
big enough, the CompSci aspects reassert themself and scalability and
maintainability issues begin to bite you in the rear.)

Odd, I'd expect that crowd to go with Fortran...


Kevin



Reply via email to