I've been a professional C developer for 30 years. I've written C in practically all spheres of application - in embedded firmware, drivers/OS stack, userspace, web, &etc.
These days, I'm not writing so much C, but more heavily depending on the deep understanding I have of how various layers of the whole stack of a computer, running an application, work. How C works, what a compiler is doing with C code, how to write good (and bad) C code .. all of this is a deep skill, still applicable to understanding and debugging at the OS and Application level.
The reason to learn C is this: there are a lot of components of the modern stack that are still composed of it. If you learn C, and know C, and can comfortably produce reliable, rock-solid, working systems around a C framework, then you will have exercised an ability that is, naturally, broadly applicable throughout the computer world.
That is not to say that you should not make C your main language; moreso, use other more advanced, more tailored languages as you see fit. But if you're going to exercise the ability to freely shift over the whole stack, C is going to be a mightier tool than most.
Re: giving K&R to newbies: it should be, give K&R plus "Expert C Programming - Deep C Secrets" to newbies, and professionals alike. Together, those two easy to read books will help you gain a fast grasp of how to write C programs, why to write them in certain ways, and so on. I find K&R a great reference, but Deep C Secrets a rather fun read; only have the latter on the crapper shelf in the bathroom, for example. Plus, I never get DeepCSecrets back when I loan it to fellow coders (ever), so I have a few extra copies, too, to give to newbies I work with.
See: (http://books.google.at/books/about/Expert_C_Programming.html...)
If you are learning C, and haven't heard of cscope, you can do no better than get it set up, do the tutorial, learn how to use it as a tool. cscope is a very capable text-based navigation/browsing tool, for large C code bases. Unpack your favourite F/OSS application, fire up cscope on the root dir, search for main, build a key word list, navigate freely. Bonus points: it has superlative vim integration.
C will not fail you when most other languages might. There are times you may realize, in fact, you are doing things that would be easier in C, off in Java and Haskell and Ruby land, ad&infinitum..
One last really, really good reason to learn C: Lua.
Lua kicks ass. Why? Because you can glom Lua into any C code base, and give yourself a much comfier language to do business/game/architecture code in, while still having a fairly large degree of raw control over the C runtime power, to boot. Master putting Lua into a small C lib collection, and you'll see what I mean.
Learning to add Lua to a big code-base is like .. somehow .. a final 'delivery' of the whole 'write code once, run it everywhere' promise, albeit its a developer mantra, not some CorporateOS-decides-to-bundle-your-interpreter/runtime issue.
Anyway, just my two cents worth. Hope I still see new C coders being made in a few more decades, eh ..
These days, I'm not writing so much C, but more heavily depending on the deep understanding I have of how various layers of the whole stack of a computer, running an application, work. How C works, what a compiler is doing with C code, how to write good (and bad) C code .. all of this is a deep skill, still applicable to understanding and debugging at the OS and Application level.
The reason to learn C is this: there are a lot of components of the modern stack that are still composed of it. If you learn C, and know C, and can comfortably produce reliable, rock-solid, working systems around a C framework, then you will have exercised an ability that is, naturally, broadly applicable throughout the computer world.
That is not to say that you should not make C your main language; moreso, use other more advanced, more tailored languages as you see fit. But if you're going to exercise the ability to freely shift over the whole stack, C is going to be a mightier tool than most.
Re: giving K&R to newbies: it should be, give K&R plus "Expert C Programming - Deep C Secrets" to newbies, and professionals alike. Together, those two easy to read books will help you gain a fast grasp of how to write C programs, why to write them in certain ways, and so on. I find K&R a great reference, but Deep C Secrets a rather fun read; only have the latter on the crapper shelf in the bathroom, for example. Plus, I never get DeepCSecrets back when I loan it to fellow coders (ever), so I have a few extra copies, too, to give to newbies I work with. See: (http://books.google.at/books/about/Expert_C_Programming.html...)
If you are learning C, and haven't heard of cscope, you can do no better than get it set up, do the tutorial, learn how to use it as a tool. cscope is a very capable text-based navigation/browsing tool, for large C code bases. Unpack your favourite F/OSS application, fire up cscope on the root dir, search for main, build a key word list, navigate freely. Bonus points: it has superlative vim integration.
See: (http://cscope.sourceforge.net/) & (http://cscope.sourceforge.net/cscope_vim_tutorial.html)
C will not fail you when most other languages might. There are times you may realize, in fact, you are doing things that would be easier in C, off in Java and Haskell and Ruby land, ad&infinitum..
One last really, really good reason to learn C: Lua.
Lua kicks ass. Why? Because you can glom Lua into any C code base, and give yourself a much comfier language to do business/game/architecture code in, while still having a fairly large degree of raw control over the C runtime power, to boot. Master putting Lua into a small C lib collection, and you'll see what I mean.
Learning to add Lua to a big code-base is like .. somehow .. a final 'delivery' of the whole 'write code once, run it everywhere' promise, albeit its a developer mantra, not some CorporateOS-decides-to-bundle-your-interpreter/runtime issue.
Anyway, just my two cents worth. Hope I still see new C coders being made in a few more decades, eh ..