Essential C
C is an excellent first language when teaching in a CompSci type environment.
If the students are of a different discipline (not aiming to be CompSci grads) or much younger then i think there are better choices e.g. Python.
In a CompSci academic setting i think learning assembly first (that is first programming language but in parallel with the other classes such as computer architecture etc.) is also a valid approach.
Programming from the Ground Up [1] is a very accessible introduction to x86 ASM and even supposing you don't go any further than the examples in this book, you'll still feel the benefits.
[1] http://ftp.igh.cnrs.fr/pub/nongnu/pgubook/ProgrammingGroundU...
Trying to write JavaScript that takes advantage of a single engine such as V8, hidden classes, type immutability, performance of 31 vs 32 bits, lack of 64 bit integer operations, cost of closures, etc. in the end, you spend so much time trying to work within this indirection that C begins to look far less wasteful and more direct, in terms of both human and machine time, especially if you have the general design of what you're trying to do figured out.
The document talks about C89, even though the last Copyright year is 2003. Isn't it about time that we start movin on? Where are the restricted pointers, the flexible array member and so on?
And, by the way, I think the comment at the bottom of page 27 is not correct:
The qualifier const can be added to the left of a variable or parameter type to declare that the code using the variable will not change the variable. As a practical matter, use of const is very sporadic in the C programming community. It does have one very handy use, which is to clarify the role of a parameter in a function prototype...
Actually, the use of const is encouraged as it helps the compiler to catch more errors as well as to enable some optimizations.
I also thought C should be the first language anyone learns. Cause you learn the most (about the machine) and other languages are easy peasy compared (well except for assembler, of course).
I highly recommend this and a bunch of other C-related stuff in the Stanford CS library. Their pointer explanations helped me many, many years ago. http://cslibrary.stanford.edu/
I've been trying to get through K&R for the past week or so. I think this will make things a lot easier. Thanks a lot!
This looks like the perfect material to learn C if you already know how to program (or at least in C-like languages like Java and C#).
Nick Parlante is an exceptional instructor. I highly recommend Google's Python Class he instructed.
I really enjoy the short / succinct format of this, does anyone have links to similar documents for java / javascript / C++?
Oh, this is fantastic. Thank you!