Metaprogramming in .NET is designed to help readers understand the basic concepts, advantages, and potential pitfalls of metaprogramming. It introduces core concepts in clear, easy-to-follow language and then it takes you on a deep dive into the tools and techniques you'll use to implement them in your .NET code. You'll explore plenty of real-world examples that reinforce key concepts. When you finish, you'll be able to build high-performance, metaprogramming-enabled software with confidence.
The book weighs in at an easily manageable 250 pages and is split into two main parts, plus four appendices. The first part forms the bulk of the text and is itself split into five sections, collectively themed around exploring a different aspect of metaprogramming Ruby on each day with a fictional mentor named Bill. One of the things I like about this book is that for the first time it draws this material together in one place, where previously it has been scattered across various different books and blog posts....
This book challenged me more than any other book I've written. I felt that I needed
to bolster my opinions with those of other respected programmers and consultants.
I asked for many opinions, and published some of the responses. Thanks to Mike
Clark, Matt Raible, Andrew Hunt, Ramnivas Laddad, Brett McLaughlin, and Eitan
Suez for answering my questions.
The Book of Ruby is an in-depth introduction to Ruby, one of the world's most popular programming languages and the backbone of the acclaimed Ruby on Rails web application framework. With an emphasis on writing clear and maintainable code, author Huw Collingbourne takes readers from the most basic constructs, like types, conditions, and loops, to more advanced techniques, like multithreading and metaprogramming.
In 2004, Ruby on Rails became public. The world was surprised by its productivity
and by the magic of Ruby that enabled Ruby on Rails. Many people
knew Ruby before Rails, but few realized the power of the language, especially
But Rails is not the first framework to realize the power of Ruby. dRuby came
long before Rails. It uses metaprogramming features for distributed programming.
Proxy objects “automagically” delegate method calls to remote objects.
You don’t have to write interface definitions in XML or any IDL.
Most implementations of critical Internet protocols are written in
type-unsafe languages such as C or C++ and are regularly vulnerable
to serious security and reliability problems. Type-safe languages
eliminate many errors but are not used to due to the perceived
We combine two techniques to eliminate this performance penalty
in a practical fashion: strong static typing and generative metaprogramming.
Static typing eliminates run-time type information
by checking safety at compile-time and minimises dynamic checks.