News for hackers. Stuff that matters.
Re:Learn C The Hard Way by alf on Sunday July 03, 2011 @12:25AM (#2723071)
C shouldn't be used for anything other than low level programming these days. There are other higher level programming language that would make your job a whole lot easier. Some programmers, like me, are stuck maintaining legacy C application code, but I wouldn't wish that fate for new programmers looking to learn C as another tool in the belt.
Re:Learn C The Hard Way by hp on Sunday July 03, 2011 @12:39AM (#2723090)
Maybe "low level" is a bit ambiguous.

I certainly agree that C is most appropriate when you are "low in the stack," just above the operating system and maybe implementing something like a virtual machine. I don't make a habit of writing stuff in C for no reason and the vast majority of programming these days isn't and shouldn't be in C (or C++ for that matter).

However, "low in the stack" is different from "low level" like "I refuse to use modern practices" or "I get to omit half the letters from my function names." You can be coding an on-the-metal kind of thing and still think about it in a high level way.

Re:Learn C The Hard Way by alf on Sunday July 03, 2011 @12:46AM (#2723096)
Right, agreed. :)
Re:Learn C The Hard Way by z92 on Sunday July 03, 2011 @03:03AM (#2723254)
Other uses of C besides low level programming is:

1. Building static libraries. 2. Building so and dll. 3. Binding those so/dll with higher level languages like Ruby, Python, Perl and PHP.

That is my main use of C these days. I always write the IO, user interface code in higher level languages and put all processing code in a so or dll written in C.

Re:Learn C The Hard Way by regularfry on Sunday July 03, 2011 @03:50AM (#2723307)
I've done a bit of this in Haskell, and it can be remarkably clean. It can also be a right pain, though.
Re:Learn C The Hard Way by malkia on Sunday July 03, 2011 @04:34AM (#2723360)
Yup. Same here.

Having not to deal with exceptions, STL libs, makes life a bit easier.