The book starts well with an interesting discussions of some arcane features of the C language. The C standartization is presented, and one can gain useful insights into why the certain features of the language are the way they are. Next, the syntax of type declarations is explained in depth. C is notorious for its arcane declarations (quick, write a declaration for an array of pointers to functions that return pointers to functions that take arrays as arguments). The author gives a flowchart algorithm to decode such declarations. Still, it's better to try and to spend another 5 minutes than to craft a line-long declaration and be proud that even you don't always understand it without referring to a book. I never write complex declarations without a long chain of preceding "typedef"s that make them simpler. The 3 chapters on linkers / shared libraries / memory are, IMHO, a complete failure. I didn't pick this book to read yet-another account of how caches work, or how to link dynamically versus statically. This has nothing whatsoever to do with advanced C programming. Had I wanted a book on OS structure, I'd take one. Besides, since the book is old (circa early 90s) and for the author the modern PC OS is MSDOS and the modern system OS is SunOS the predecessor of Solaris), the information is outdated and in parts irrelevant (like the segments used in programming DOS programs). The book's age also shows in the discussion of K&R; C. Perhaps in 1990, when the standartization of C was recent, the differences between K&R; C and ANSI C were important. These days, this plays absolutely no practical role. The author spends a long time explaining pointers and arrays - when they are and aren't interchangeable, how are they laid out in memory and how to use them efficiently. He also devotes attention to multidimensional arrays which are problematic in C from many aspects. These topics are very important to know well if one is serious about C programming, because the bugs of wrongly offsetted arrays are very devious. Another thing I liked about the book is its "light relief" sections, when the author tells about curious incidents from the history of software/hardware development. While mostly having no relation to C, these sections are very entertaining. Unfortunately, the author ends the book badly. In a last chapter devoted to C++, he concludes that C++ is bloated because it's not orthogonal (the same argument is sometimes made against Perl), and that in any case, one should avoid templates, exceptions, virtual base classes and multiple inheritance when programming C++. While virtual base classes and multiple inheritance are indeed useful only in rare situations when you're building a complex OO framework, one who says not to use templates and exceptions clearly has no idea of what he's talking about. IMHO, of course. All in all, I didn't like the book. The author should have stayed on his original goal of explaining advanced C... granted, this would become a pamphlet rather than a book, but hey, C is in essence a simple language !

Comments

comments powered by Disqus