Modern C [pdf]
icube-icps.unistra.fr
Modern C [pdf]
1–10 of 396 posts
Re: Modern C [pdf]
#2Re: Modern C [pdf]
#3Re: Modern C [pdf]
#4Does it advocate good best practices?
Does it talk about pitfalls?
Does it overemphasize new, possibly less widely implemented, features?
Does it do/not do anything else we should know about?
Re: Modern C [pdf]
#5IMO, the title here is misleading, I don't think new feature is added to C to make it modern.
Re: Modern C [pdf]
#6I 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.
"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."
Re: Modern C [pdf]
#7I 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.
Re: Modern C [pdf]
#8I didn't use C much. What kind of features of are in the book that make it modern?
Re: Modern C [pdf]
#9I mean, is there some subset of C that is safer than what I think of when I think of C? I know about stuff like reference counting techniques, rather than manual memory management, for example, and that goes miles towards safer coding. But, even so, the variety of ways you can shoot yourself in the foot with C are seemingly beyond counting. Are threads and async easier and/or safer now than 10-20 years ago, and with more direct language or standard library support? Is memory management in the standard library safer today? Are there concurrency primitives (beyond low-level interacting with epoll or kqueues or even fork or whatever)?
I mean, it's obviously possible to write reliable, safe, secure, software in C (Linux, Git, SQLite, all come to mind), but how much easier has it gotten? Would anyone choose C for a new systems project with no legacy baggage or dependencies, in a world with Rust and Go?
Re: Modern C [pdf]
#10It's been a decade or more since I've worked in C (and have never been a heavy C coder). Is "modern C" really a thing? I mean, is there some subset of C that is safer than what I think of when I think of C? I know about stuff like reference counting techniques, rather than manual memory management, for example, and that goes miles towards safer coding. But, even so, the variety of ways you can shoot yourself in the f…
Note that Go does not entirely compete in the same space, and Rust is only starting to gain traction.