On Dec 11, 2007 9:20 AM, Duncan Coutts &lt;<a href="mailto:duncan.coutts@worc.ox.ac.uk">duncan.coutts@worc.ox.ac.uk</a>&gt; 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>&lt;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&#39;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&#39;s say I have a type which is both a Monad and a Comonad: which default implementation gets used?
<br><br>I&#39;m disappointed to see this objection isn&#39;t listed on the wiki.<br></div></div><br>-- <br>Dave Menendez &lt;<a href="mailto:dave@zednenem.com">dave@zednenem.com</a>&gt;<br>&lt;<a href="http://www.eyrie.org/~zednenem/">
http://www.eyrie.org/~zednenem/</a>&gt;