December 30, 2009
BCS wrote:
> C is Latin, about 300 years ago: A dead language that no one uses but everyone knows.

C is still in wide use.
December 30, 2009
Hello Walter,

> BCS wrote:
> 
>> C is Latin, about 300 years ago: A dead language that no one uses but
>> everyone knows.
>> 
> C is still in wide use.
> 

OK I over stated. OTOH, Latin was in wide use (for some professions) 300 years ago.

I guess my point is that aside from VERY resource limited systems, almost no one will have C as their first choice. Even with those limited systems I'd bet that most people would rather be working in something else if they could. That said, there are many places where it ends up being the lingua franca.


December 31, 2009
BCS wrote:
> I guess my point is that aside from VERY resource limited systems, almost no one will have C as their first choice. Even with those limited systems I'd bet that most people would rather be working in something else if they could. That said, there are many places where it ends up being the lingua franca.

I still think you're underestimating C's audience. Consider the Linux effort - they can choose any implementation language they want, and they choose C. They aren't forced into C.
December 31, 2009
Wed, 30 Dec 2009 23:36:36 +0000, BCS wrote:

> Hello Walter,
> 
>> BCS wrote:
>> 
>>> C is Latin, about 300 years ago: A dead language that no one uses but everyone knows.
>>> 
>> C is still in wide use.
>> 
>> 
> OK I over stated. OTOH, Latin was in wide use (for some professions) 300
> years ago.
> 
> I guess my point is that aside from VERY resource limited systems, almost no one will have C as their first choice. Even with those limited systems I'd bet that most people would rather be working in something else if they could. That said, there are many places where it ends up being the lingua franca.

If you ask this question from e.g. the linux kernel devs, they always answer C. It's not a surprise that projects like GIT are (mostly) written in C. Most traditional *nix software is written in C and so are libraries like GTK+. C just works :)
December 31, 2009
retard wrote:
> C just works :)

Until you have buffer overflows!
December 31, 2009
Walter Bright:
> I still think you're underestimating C's audience.

Yep. The Tiobe index is mostly trash, but it shows C as the second most used language, just after Java, and Java usage is getting lower, I think in a couple years C even risks becoming the most used, according to that flawed metrics:
http://www.tiobe.com/content/paperinfo/tpci/index.html
Tiobe is not a serious thing, but you can't deny that C is in wide use still. It's a mostly clean language, concise, and you usually know that what you do will not cost too much for the CPU.

Bye,
bearophile
December 31, 2009
BCS Wrote:
> 
> I guess my point is that aside from VERY resource limited systems, almost no one will have C as their first choice. Even with those limited systems I'd bet that most people would rather be working in something else if they could. That said, there are many places where it ends up being the lingua franca.

C has the advantage of working pretty much the same on every platform around, while C++ compilers are /still/ unreliable about standard library support, language features, etc.  In fact, my current project is in C, though I'd prefer at least using the "C with objects" style of C++ like DMD is written in.  As you've said, C is the lingua franca in many places and it's difficult to displace.
December 31, 2009
== Quote from Sean Kelly (sean@invisibleduck.org)'s article
> BCS Wrote:
> >
> > I guess my point is that aside from VERY resource limited systems, almost no one will have C as their first choice. Even with those limited systems I'd bet that most people would rather be working in something else if they could. That said, there are many places where it ends up being the lingua franca.
> C has the advantage of working pretty much the same on every platform around,
while C++ compilers are /still/ unreliable about standard library support, language features, etc.  In fact, my current project is in C, though I'd prefer at least using the "C with objects" style of C++ like DMD is written in.  As you've said, C is the lingua franca in many places and it's difficult to displace.

C is such an unbelievably low level language that I find it amazing that anyone would use it outside of kernels, device drivers, very resource-limited embedded systems and legacy systems where the decision was made a long time ago.  I would think the portability issues of C++ would be easier to deal with than the extreme low levelness of C.
December 31, 2009
dsimcha Wrote:

> == Quote from Sean Kelly (sean@invisibleduck.org)'s article
> > BCS Wrote:
> > >
> > > I guess my point is that aside from VERY resource limited systems, almost no one will have C as their first choice. Even with those limited systems I'd bet that most people would rather be working in something else if they could. That said, there are many places where it ends up being the lingua franca.
> > C has the advantage of working pretty much the same on every platform around,
> while C++ compilers are /still/ unreliable about standard library support, language features, etc.  In fact, my current project is in C, though I'd prefer at least using the "C with objects" style of C++ like DMD is written in.  As you've said, C is the lingua franca in many places and it's difficult to displace.
> 
> C is such an unbelievably low level language that I find it amazing that anyone would use it outside of kernels, device drivers, very resource-limited embedded systems and legacy systems where the decision was made a long time ago.  I would think the portability issues of C++ would be easier to deal with than the extreme low levelness of C.

In my case it's really mostly entrenchment.  I could have pushed for C++, but I'd have been the only one on the team who'd spent much time with the language so there'd have been little point.  As it is, I find myself lamenting the "pointers are arrays" issue every single day.  I've ended up writing a whole slew of memxxx() routines the standard library left out just so I could do string manipulation without inserting and removing null terminators for each operation.
December 31, 2009
Hello Walter,

> BCS wrote:
> 
>> I guess my point is that aside from VERY resource limited systems,
>> almost no one will have C as their first choice. Even with those
>> limited systems I'd bet that most people would rather be working in
>> something else if they could. That said, there are many places where
>> it ends up being the lingua franca.
>> 
> I still think you're underestimating C's audience. Consider the Linux
> effort - they can choose any implementation language they want, and
> they choose C. They aren't forced into C.
> 

Yes, C has a wide audience (any one who says differently is selling something). But I still thing that their are very few cases where C will be chosen for reasons other than it's purely technical merits. If C++/Java/C#/python/whatever would have done just as good a job in Linux as C, I'd almost bet that Linux wouldn't have been written in C. My point isn't that C is never the right choice (as that is clearly false) but that when C is chosen, it's (almost) always for technical reasons rather than aesthetic ones (where it is merely good enough).