Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I looked into the table of contents & jumped into pages of it. It looks like good material on best practices & optimization rules & tips. Quickly, bookmarked it & definitely worth reading.

IMO, the title here is misleading, I don't think new feature is added to C to make it modern.



The reason Gustedt calls it Modern C has to do with how he organizes the contents, especially the last level: Ambition.

"This book is organized in levels. The starting level, encounter, will introduce you to the very basics of programming with C. By the end of it, even if you don’t have much experience in programming, you should be able to understand the structure of simple programs and start writing your own.

The acquaintance level details most principal concepts and features such as control structures, data types, operators and functions. It should give you a deeper understanding of the things that are going on when you run your programs. This knowledge should be sufficient for an introductory course in algorithms and other work at that level, with the notable caveat that pointers aren’t fully introduced yet at this level.

The cognition level goes to the heart of the C language. It fully explains pointers, familiarizes you with C’s memory model, and allows you to understand most of C’s library interface. Completing this level should enable you to write C code professionally, it therefore begins with an essential discussion about the writing and organization of C programs. I personally would expect anybody who graduated from an engineering school with a major related to computer science or programming in C to master this level. Don’t be satisfied with less. The experience level then goes into detail in specific topics, such as performance, reentrancy, atomicity, threads and type generic programming. These are probably best discovered as you go, that is when you encounter them in the real world. Nevertheless, as a whole they are necessary to round off the picture and to provide you with full expertise in C. Anybody with some years of professional programming in C or who heads a software project that uses C as its main programming language should master this level.

Last but not least comes ambition. It discusses my personal ideas for a future development of C. C as it is today has some rough edges and particularities that only have historical justification. I propose possible paths to improve on the lack of general constants, to simplify the memory model, and more generally to improve the modularity of the language. This level is clearly much more specialized than the others, most C programmers can probably live without it, but the curious ones among you could perhaps take up some of the ideas."


Eh? C11 isn't modern?


It is indeed. But its more a polishing of C99 imo. At least annex k is optional now iirc.


The C standards kind of have a main theme, eg numerics (aka eating Fortran's lunch) for C99 (_Complex, restrict, variable-length arrays, type-generic math functions, ...).

While C11 is indeed to some degree a polishing of C99, its theme is multi-threading.


Yep, I've not tried the c11 threads yet, pthreads tend to work for me and in kernel, well not like i'll be using c11 threads anyway. So its been a bit of a "maybe someday" task. :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: