On Sat, Sep 6, 2008 at 8:00 PM, David Chelimsky <[EMAIL PROTECTED]>wrote:


> class Property
>  def add_marker_to(map)
>   map.add_marker Marker.new(address, latitude, longitude, contents)
>  end
> end
>
> That reduces the surface contact between the Property and the Map even
> more.
>

The surface contact between those objects is indeed reduced. But now the map
has to ask the marker for this information, rather than the property. The
number of surface contact points just increased by one.

Plus, the information is still copied instead of referenced. Which means
that if someone made a typo in the property's address, they'd have to
remember to copy it to the map again.

Anyway, there are lots of ways to skin cats, and it's interesting to discuss
them (if not necessarily rspecy).

///ark
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to