views:

141

answers:

3

If you want to read the "source" of a language in C you go to C Programming Language by Kernighan; Ritchie; 0131103628

And in Java you read Goslings The Java(tm) Language Specification; 0321246780

But what do you read if you want to read a good book about the "specs" on C++ and C#?

+3  A: 

C++: Stroustrup's book and/or Stroustrup's D&E or Stroustrups ARM though the latter two are not in date. The ISO spec is available (see Charles bailey's answer) and is the final word if that's the type of doc you want. The most thorough answer is in the comments by aJ :- http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list. The equivalent of K&R for C++ is the first one.

C#: The C# Programming Language (3rd Edition) by Anders Hejlsberg, Mads Torgersen, Scott Wiltamuth, and Peter Golde). If you're looking for the generally accepted definitive book on C#, that's C# in depth.

Ruben Bartelink
Care to explain the -1?
Ruben Bartelink
The ISO spec for C++ isn't free. (This is just a factual comment, not a reason for a `-1` which I can't explain.)
Charles Bailey
+1 for Stroustrups book. Though not not officially standard (its close enough for everyday usage and) it is slightly easier to read than the standard.
Martin York
@Charles: I had that in the back of my mind - that would be worth a -1 if it was accompanied with a comment (dont think I had that in the answer at the time). Thanks. Editing...
Ruben Bartelink
Ruben Bartelink
Ok great, thanks !
Chris_45
@Charles Bailey: Do you know (about) how much the ISO C++ spec costs? Could you put a link to to where one might order it?
jwfearn
Charles Bailey
@Charles Bailey: Thanks! I just ordered it from amazon.co.uk (approximately $57 USD with shipping)
jwfearn
Herb Sutter has a blog posting with more details about the ISO C++ standard: http://herbsutter.wordpress.com/2010/03/03/where-can-you-get-the-iso-c-standard-and-what-does-open-standard-mean/
jwfearn
A: 

For C# you should check out the language specification or even better the annotated hard copy of that.

Brian Rasmussen
+6  A: 

If you want the true specifications of the language then you need to consult the appropriate standards.

C# is standardized by ECMA: C# ECMA . (The standard is also approved as an ISO standard.)

C++ is standardized by ISO, IEC and various national standards bodies: C++ ISO .

Although K&R was once the specification for the C language, C is now an ISO standard as well. C ISO

Charles Bailey
Ruben Bartelink
It contains a language reference section, but it isn't the current spec of the language.
Charles Bailey