From: Trans Date: 2008-04-03T03:46:49+09:00 Subject: A Question Of Coupling I have a choice to make about a class interface. This is a very very simplified "foo" demo of that choice. #1 class Foo def initialize(bar) @bar = bar end def okay? bar.okay? end end bar = Bar.new Foo.new(bar) Or #2 class Foo def initialize( opts ) @okay = opts[:okay] end def okay? @okay end end bar = Bar.new Foo.new(:okay => bar.okay?) Now, my inner OOP Angel is telling me to take door #2 in order to avoid strong coupling between Bar and Foo. But, my Red Ruby Devil is saying "Duck typing, you fool. It doesn't matter anymore!" Is he right? Has Ruby completely changed the game? If so, why aren't more Rubyists using OStruct-esque option passing? T.