C is obsolete. Learn C++ (C is a subset of C++ so the knowledge is applicable anyway). For learning C++, I highly recommend Herbert Schlidt's C++: A Beginner's Guide (ISBN 0-07-219467-7, Osborne/McGraw Hill, 2002).
K&R is still the only book on C worth reading. If you're an idiot you can try to learn it by reading the standard (which >>10 tried to suggest, but messed up by linking to the wrong one), but the standard is by necessity littered with clutter useless to the beginner, and omits a lot of things you should know.
Ignore people like >>12-13. The only language they know is Sepples, and they think that means that everyone else should only be using that one as well.
>>17
C hasn't either. A small subset of morons who thought Sepples was an improvement over C decided to force some of their misfeatures into a new standard, and because the C community is on the whole sensible, that new standard has been widely ignored. There's a reason most compilers consider -ansi to mean C89, and it's not because people are lazy.
Name:
Anonymous2010-05-17 15:39
the standard (which >>10 tried to suggest, but messed up by linking to the wrong one)
the one >>10 linked to is the current ISO and ANSI standard (ISO 9899:1999 + TC1 + TC2 + TC3).
would you have preferred the latest C1x draft instead?
C hasn't either. A small subset of morons who thought Sepples was an improvement over C decided to force some of their misfeatures into a new standard, and because the C community is on the whole sensible, that new standard has been widely ignored.
ANSI disagrees with you. also, C99 is a huge improvement over C89 (which was itself a huge improvement over sepples), and C1x is going to be even better.
the only misfeature C99 copied from sepples was single-line comments, and if you don't use those, there's not any significant whitespace in the language.
Name:
Anonymous2010-05-17 15:49
>>16
How do you know this?
Also one of Sony's studios used Lisp in their PS2 games. SONY WINS AGAIN
>>26
You know that it's possible to find out almost everything you want about any game with the right reverse engineering skills? Finding out what compiler was used is usually trivial work.
Name:
Anonymous2010-05-17 16:06
>>21
ok, there are two misfeatures copied from sepples. but they don't affect your code if you don't use them. and things like VLAs, compound literals, and designated initializers more than make up for those.
Name:
Anonymous2010-05-17 16:06
>>26
Was it that Paul Grayham guy? I heard they rewrote everything in Java.
>>19
No one gives a shit about your "significant whitespace". The pretence of being unable to differentiate between the space and the tab key is bad enough, but now you're going to tell us that your shit editor can't even display line breaks?
\n is at least as reasonable and practical as a comment terminator as any other ASCII character, so deal with it.
Name:
Anonymous2010-05-17 16:17
>>32 >>19 wasn't complaining about significant whitespace. that's just the only complaint anyone has about single-line comments.
if you look closely, >>19 was advocating C99 over C89.
please read more carefully before replying to posts in the future. we wouldn't want people to think the rest of us are that stupid.
>>32
You're a moron. Significant whitespace is fine in language that are designed to take advantage of it, like Python and Haskell. It isn't fine when it's suddenly inflicted on a language that hasn't had it, just to appease Sepples users who can't keep their bad habits to their own fucking language.
>>33 >>19 explicitly named single line comments as a `misfeature', and of his own accord, as no one else in the thread had brought it up.
>>34
And a deafening silence filled the room as absolutely nothing changed. `Inflicted' would generally imply some kind of negative effect, so feel free to name any one. Most C compilers already supported single line-line comments as an extension just for the heck of it anyway.
>>35
I bet you're one of these people who argues that Sepples is alright because if you're careful you can just write C in it. Maybe /pr/ would be a better place for you.
Name:
Anonymous2010-05-17 16:34
suddenly inflicted on a language that hasn't had it
actually, comments are removed by the preprocessor and the preprocessor has always had significant whitespace. // blah blah
isn't really any different from #comment blah blah
except that the first one works and the second one doesn't.
>>37
Comments can be removed by the preprocessor, but don't have to be. The preprocessor has always had significant newlines, and that's fine, but /**/ and // comments aren't preprocessor syntax. The former is pure C, the latter is Sepples.
Name:
Anonymous2010-05-17 16:40
>>38
the point is that C already had significant newlines and no one complained about it until sepples-style comments became part of the C standard (long after most C compilers implemented them as an extension).
>>39
The C preprocessor and C the language are separate things. C has never had significant newlines.
Standard-breaking behavior on the part of C compilers isn't something that should be considered a feature. GNU C is even worse than C99.