On Wed, Oct 06, 2004 at 05:25:40AM +0900, Richard Lyman wrote:
> Say I wrote something that used 10 parts. I left it for a while, and
> later came back because I knew I could rewrite part #4 better. I
> wouldn't have to mess with parts 1-3, or parts 5-10. Just make sure
> part 4 quacks like the duck that it used to be and change a few lines
> in Copeland and you're in business.

What you are describing (duck typing) seems to me totally orthogonal to
Copland.  I can easily write my code like this:

  class Part1
    def initialize(part4)
      @part4 = part4
    end
  end

  class Part4
  end

  p4 = Part4.new
  p1 = Part1.new(p4)

then come back later and change Part4 to something else and Part1 never
knows the difference.

As Jamis pointed out in his talk, Copland is useful when you have many
layers of dependencies and don't want to worry about how everything fits
together and gets initialized, but I just don't typically have code that
fits that description (and for the dependencies I do have, I find
explicitly representing them through parameters to the constructor, as
above, to be good enough for many situations, without resorting to a
more complex solution).

Anyway, my point was that while Copland isn't particularly useful to me
(the bulk of the code I write is in C++, not Ruby), I'm nevertheless
interested in its development.

Paul