Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I started programming about 20 years ago with the first edition of the book C for Dummies. It was a great introduction to code and I am now a professional software developer. However, these days I work with higher level languages most of the time (e.g. Ruby, PHP, Java, and lots of web stuff). I would like to revisit C but I know that a lot has changed, and two new standards (C99, C11) have come out since then. I would like to learn about the new features but I am mostly interested in writing portable code that I can write higher level language bindings for in some other language.

Are there any good books or websites that talk about:

  • What standard to target
  • The differences between the standards
  • Caveats in the standard libraries (like I understand these days one is supposed to look for buffer overflows when dealing with strings, etc.)
  • UTF-8 support
  • Commonly used libraries, like STL or Boost for C++

And anything else I might be missing.

share|improve this question

closed as off-topic by Robert Harvey, Martijn Pieters, Dan Pichelman, MichaelT, user61852 Jul 12 '13 at 14:52

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Robert Harvey, Martijn Pieters, Dan Pichelman, MichaelT, user61852
If this question can be reworded to fit the rules in the help center, please edit the question.

The STL was a C++ library. The C++ standard library, which is most likely what you mean by "STL", is also a C++ library (duh!). And Boost is a C++ library as well. –  delnan Jul 10 '13 at 21:11
Yes, I know. I meant, does C have such analogues for e.g. string handling (especially UTF-8, I have a cursory knowledge that wchar.h exists), and other stuff like commonly used data structures. –  nc01 Jul 10 '13 at 21:35
Well this matter has been discussed on stackoverflow for quite some time. Finally the community has come up with a good list of books. See here, including recommendations and ANTI-recommendations stackoverflow.com/questions/562303/… Enjoy –  AnyOneElse Jul 11 '13 at 11:55

1 Answer 1

I feel like I have seen some new advances in modern C design, but I understand there is no universally accepted new method. I think that many of the trends that you have seen in other languages are now popular in C.

  • Well defined interfaces and implementations with opaque data structures
  • Multithreading (The C11 threads library is awesome)
  • Basic unit testing
  • Strong separation of concerns.
  • Higher level memory management (reference counting, etc)

I also learned a lot about C code design by reading and using Apple's Core Foundation framework. It amazed me that so much of the iOS and Mac can reuse these basic C modules.

I think the best part about C is that it is very simple in comparison to C++. The changes in the new languages are things you would expect to be standard - not drastic changes to the way code is written (expanded types, variable length arrays, built in threading, etc). Time has also not created an expansive standard library or way of doing things that will take you years to master as in the STL/Boost camp or even Objective-C.

Good Book (C Interfaces and Implementations): http://www.amazon.com/books/dp/0201498413

Good Book (21st Century C): http://shop.oreilly.com/product/0636920025108.do

Good Website (C Game focused articles): http://fabiensanglard.net

share|improve this answer
What is your C11 compiler? I've been looking at Clang, and they seem to have extensive support for C++11, but not C11. –  Robert Harvey Jul 10 '13 at 21:50
@RobertHarvey I'm not Justin (clearly; I can't speak for him is what I mean) but I've used Pelles C for compiling my C code, and it seems to work well. –  Hydronium Jul 11 '13 at 15:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.