Book Reviews

C# 4.0 in a Nutshell: The Definitive Reference by Joseph Albahari and Ben Albahari

ISBN: 978-1449380458
Publisher: O'Reilly Media
Pages: 1056

I do love the irony that a programming language designed with the explicit goal of being simple ends up with a +1000 pages tome just to capture its essentials. And I do love to contrast it to John McCarthy's original Lisp definition taking up basically a single page. Language design aside, C# in a Nutshell served me well in getting up to speed with the language.

It's been almost six years since the last time I worked actively in C#. Obviously the language has evolved a lot since then. C# has gotten several interesting additions, basically everything from lambda-expressions to a high-level library for parallel programming. Naturally, C# and .Net come with a large library for a wide variety of tasks. And that's where I expected the learning curve to be. Thus, the complexity of the core language of today's C# came as a surprise. C# may be a step-up from Java, but as I flip through this book I wouldn't by any stretch consider the language simple or elegant. Rather, I'm reminded of C++ where features are simply piled upon each other without much synergy and leverage.

But back to the book itself. How does C# in a Nutshell work? The book is basically organized as a series of tutorials. I wouldn't recommend anyone without prior programming experience trying to learn their first language from this book. But if you have a solid coding background in a couple of languages, this is a decent introduction. Personally, I started by reading the first four chapters serially. These chapters provide a general introduction, an overview of the type system and an "advanced" chapter covering delegates, events, and anonymous functions. With those chapters behind me, the rest of the book served as a nice introduction to various subjects that I read as needed. Even-though the subtitle claims that C# 4.0 in a Nutshell is "The Definitive Reference", it isn't. You'll still need the online reference documentation, but this book helps you navigate it. That in itself is valuable.

Reviewed February 2011