1

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#?

Chris_45
  • 8,769
  • 16
  • 62
  • 73

3 Answers3

6

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

CB Bailey
  • 755,051
  • 104
  • 632
  • 656
4

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 :- 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.

Community
  • 1
  • 1
Ruben Bartelink
  • 59,778
  • 26
  • 187
  • 249
  • 1
    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.) – CB Bailey Sep 17 '09 at 08:17
  • +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 Sep 17 '09 at 08:24
  • @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 Sep 17 '09 at 08:25
  • @Martin: Thanks. In my answer I was trying to offer the moral equivalent of K&R for C++. I guess the accept will decide what the questioner was really looking for. – Ruben Bartelink Sep 17 '09 at 08:32
  • @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 Feb 02 '10 at 17:20
  • 1
    @jwfearn: 380 swiss francs from ISO (http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=38110) ; ~30GBP from amazon (http://www.amazon.co.uk/Standard-Incorporating-Technical-Corrigendum-No/dp/0470846747/ref=sr_1_1?ie=UTF8&s=books&qid=1265132511&sr=8-1). Your national standards body may also publish a cheaper version. – CB Bailey Feb 02 '10 at 17:44
  • @Charles Bailey: Thanks! I just ordered it from amazon.co.uk (approximately $57 USD with shipping) – jwfearn Feb 03 '10 at 01:46
  • 1
    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 Mar 03 '10 at 16:00
0

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

Brian Rasmussen
  • 114,645
  • 34
  • 221
  • 317