On Jan 8, 2006, at 9:00 AM, gwtmp01 / mac.com wrote: > One of the things I really liked about Bertrand Meyer's _Object > Oriented > Software Engineering_ was his 'programming by contract' point of view. > I've found that concept to be useful in almost any program I've > written > after reading that book regardless of the language I've used. > > One of the most useful ideas is the notion that if client code > refuses to adhere to the pre-conditions then all bets are off and the > library code has no responsibility to ensure correct behavior. This is an excellent point, in my opinion. If I write code like: not_my_object.instance_eval { @secret_value += 1 } I know I'm crossing the line. When it eventually breaks, I'll know who's fault it is. For now though, I'm telling Ruby, "Just trust me; I know what I'm doing here." The great part is that she believes me and does it. ;) James Edward Gray II