Live data from Hacker News

Essential C

cslibrary.stanford.edu

11–20 of 57 posts

Re: Essential C

#12

I recently started a graduate course that originally required C++. My only exposure to C++ basically went through the fundamentals of the C part without getting to any of the ++. Is there something similar to this for C++? I understand that C++ is a much larger language and I'm definitely not looking for something comprehensive, more of a solid overview of a workable subset of the language. Enough to be productive, p…

I'd recommend A Tour of C++, by Bjarne Stroustrup. http://www.stroustrup.com/Tour.html

+1 to this. I took a course by Prof Stroustrup and he strongly newcomers to start with this book

Re: Essential C

#13
post #2

Essential C doesn't mention a standard but it says Copyright 1996-2003 . I'm going guess it hasn't been updated for C11. Modern C [1] covers C11 and was mentioned before. However, it weighs in at 300 pages rather than Essential C 's 45. [1] http://icube-icps.unistra.fr/img_auth.php/d/db/ModernC.pdf Actually, reading through Essential C , it hasn't really been updated for C99 since it uses C89 declarations: C takes th…

I don't know if I would count any part of C11 as "essential", particularly given its still-spotty implementation coverage.

Re: Essential C

#14
post #2

Essential C doesn't mention a standard but it says Copyright 1996-2003 . I'm going guess it hasn't been updated for C11. Modern C [1] covers C11 and was mentioned before. However, it weighs in at 300 pages rather than Essential C 's 45. [1] http://icube-icps.unistra.fr/img_auth.php/d/db/ModernC.pdf Actually, reading through Essential C , it hasn't really been updated for C99 since it uses C89 declarations: C takes th…

I don't know if I would count any part of C11 as "essential", particularly given its still-spotty implementation coverage.

You might be right. I looked up my favorite modern C feature and it is intermingled declarations and code which is in C99. Others include inline functions, // comments (which were in C++), ...

Re: Essential C

#15

I recently started a graduate course that originally required C++. My only exposure to C++ basically went through the fundamentals of the C part without getting to any of the ++. Is there something similar to this for C++? I understand that C++ is a much larger language and I'm definitely not looking for something comprehensive, more of a solid overview of a workable subset of the language. Enough to be productive, p…

"Thinking in C++" by Bruce Eckel

"Effective C++" by Scott Myers

Re: Essential C

#16
post #2

Essential C doesn't mention a standard but it says Copyright 1996-2003 . I'm going guess it hasn't been updated for C11. Modern C [1] covers C11 and was mentioned before. However, it weighs in at 300 pages rather than Essential C 's 45. [1] http://icube-icps.unistra.fr/img_auth.php/d/db/ModernC.pdf Actually, reading through Essential C , it hasn't really been updated for C99 since it uses C89 declarations: C takes th…

I don't know if I would count any part of C11 as "essential", particularly given its still-spotty implementation coverage.

A lot of code is still written in C89 for maximum portability, and I regularly do that. The only thing I really miss from C99 is the mixed declarations and code, but you can instead use nested scopes or just move the declarations up to the top.

Re: Essential C

#17
Oh, memories. I took CS107 in 1996, which was apparently the date this handout was written. Nick was my academic advisor, and his CS108 (which was C++ at the time) was one of my favorite courses of all time. Bunny World...

Maybe I'm just a grumpy old programmer, but I feel like kids these days are missing out on something important by learning to program in a language that doesn't require them to truly grok memory management.

Re: Essential C

#18

I recently started a graduate course that originally required C++. My only exposure to C++ basically went through the fundamentals of the C part without getting to any of the ++. Is there something similar to this for C++? I understand that C++ is a much larger language and I'm definitely not looking for something comprehensive, more of a solid overview of a workable subset of the language. Enough to be productive, p…

For a beginner, I think it's hard to beat "C++ Primer" by Stanley Lippman.

Re: Essential C

#19

Earlier quoted context omitted.

I don't know if I would count any part of C11 as "essential", particularly given its still-spotty implementation coverage.

A lot of code is still written in C89 for maximum portability, and I regularly do that. The only thing I really miss from C99 is the mixed declarations and code, but you can instead use nested scopes or just move the declarations up to the top.

C99 object literals are also fantastic. I feel very constrained when I have to use strict C89.

Meanwhile, in terms of C11 [update: actually also from C99] I actually wrote a function with a signature like

  void func(int arg[static 3]);
but later removed it because (a) the generated code was the same, and (b) rather than increasing clarity and self-documentation, it caused confusion; even when you're familiar with the feature, it never stops looking like a syntax error.

Re: Essential C

#20

Earlier quoted context omitted.

A lot of code is still written in C89 for maximum portability, and I regularly do that. The only thing I really miss from C99 is the mixed declarations and code, but you can instead use nested scopes or just move the declarations up to the top.

C99 object literals are also fantastic. I feel very constrained when I have to use strict C89. Meanwhile, in terms of C11 [update: actually also from C99] I actually wrote a function with a signature like void func(int arg[static 3]); but later removed it because (a) the generated code was the same, and (b) rather than increasing clarity and self-documentation, it caused confusion; even when you're familiar with the…

I do love object literals. The 'static' keyword for array parameters actually dates to the C99 standard.
Post reply on HN