Hacker News new | ask | show | jobs
by drallison 5166 days ago
C is an adequate language (actually, more than adequate) with a large base of skilled programmers. There is a long history of successful development. And the developer base is aware of the warts that still remain in the language.
1 comments

But why use C when there are other Systems programming languages like Go, C++, D, etc..
You can compile programs with those languages and get something that works, but on a regular basis, some programmer will say something like, "Ok, I'll use Go for project x" and get part of the way into it and then discovers...

...a critical library has not been ported.

...a really useful language feature doesn't exist, or its implementation isn't appropriate for this application.

...a compiler bug appears and causes days to weeks of torment.

...it's difficult to deploy and distribute the result.

...there are fewer tools, debugging aids, etc.

Languages don't live in a "clean room" environment. All of these things add value even when the language itself is unsound. And then you weigh the cost of rolling new tools, fixing the compiler yourself, etc. against building on the old stuff, and the old stuff wins most of the time. Reaching the opposite conclusion is the exception, and to get there, the language usually has to carve out a niche use-case where it has the best library for a certain domain.

One reason would be the massive existing codebases written in C (Linux kernel, anyone?)...
We should all switch to Java/C#. It makes programming much much faster and easier. http://techiest.blogspot.com/.
I work on embedded microcontrollers that have, at the most, 16K of code space and 512 bytes of RAM. I have a nice efficient optimizing C compiler that creates object code nearly as tight as the local assembly language.

Do you think I would benefit from Java? Because I don't.

And the resulting code much slower too. It all depends on what you want to accomplish. Really, THIS particular topic has substantial bandwidth allocated to it already...