This post originated from an RSS feed registered with Ruby Buzz
by Peter Williams.
Original Post: The Null Object Pattern
Feed Title: Peter Williams' Weblog
Feed URL: http://barelyenough.org/blog/tag/ruby/feed/
Feed Description: Random thoughs about software development, and anything else I find interesting.
Noticed this interesting article about the Null Object Pattern. Basically, it is the idea that the null/nil object could accept any message and return itself, rather than the more canonical approach of throwing an exception. This seems to lead to simpler, more elegant, code due to the lack of exception handling and null/nil [...]