[Prev][Next][Index][Thread]

Re: simple method dispatch question



In article <8uhb1c$963$1@nnrp1.deja.com>, johncwhi@my-deja.com wrote:

> I like your second technique better than the first.  I wonder which
> would be more efficient.
> 
> Here's another gotcha in this whole thing though:  You probably wouldn't
> know that you need to have the print-as protocol for printing derived
> classes until (of course) you created the derived classes.  A derived
> class might not seem necessary during initial design phases. This could
> force some redesign (is the $64 word "refactoring") in Dylan which might
> be avoided in C++.

Except that in Dylan you can always add this new print-as generic 
function with methods on <test> and <test1> even if the <test> and 
<test1> classes are defined in a different, already compiled, library.

-- Bruce



References: