On Dec 11, 2007 9:20 AM, Duncan Coutts <<a href="mailto:duncan.coutts@worc.ox.ac.uk">duncan.coutts@worc.ox.ac.uk</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
So my suggestion is that we let classes declare default implementations<br>of methods from super-classes.</blockquote><div><snip. <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Does this proposal have any unintended consequences? I'm not sure.<br>Please discuss :-)</blockquote><div><br>It creates ambiguity if two classes declare defaults for a common superclass.<br><br>My standard example involves Functor, Monad, and Comonad. Both Monad and Comonad could provide a default implementation for fmap. But let's say I have a type which is both a Monad and a Comonad: which default implementation gets used?
<br><br>I'm disappointed to see this objection isn't listed on the wiki.<br></div></div><br>-- <br>Dave Menendez <<a href="mailto:dave@zednenem.com">dave@zednenem.com</a>><br><<a href="http://www.eyrie.org/~zednenem/">
http://www.eyrie.org/~zednenem/</a>>