<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Declaration-Site Extension Methods</title>
	<atom:link href="http://digital-sushi.org/entry/declaration-site-extension-methods/feed/" rel="self" type="application/rss+xml" />
	<link>http://digital-sushi.org/entry/declaration-site-extension-methods/</link>
	<description>Thoughts on language design, API design, compilers, Smalltalk, and Java technology</description>
	<pubDate>Mon, 06 Oct 2008 15:05:33 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Discussions on Java7 new features &#171; mindstorms</title>
		<link>http://digital-sushi.org/entry/declaration-site-extension-methods/#comment-930</link>
		<dc:creator>Discussions on Java7 new features &#171; mindstorms</dc:creator>
		<pubDate>Mon, 17 Dec 2007 22:42:48 +0000</pubDate>
		<guid isPermaLink="false">http://digital-sushi.org/entry/declaration-site-extension-methods/#comment-930</guid>
		<description>[...] Declaration-Site Extension Methods [...]</description>
		<content:encoded><![CDATA[<p>[...] Declaration-Site Extension Methods [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Axel Groß</title>
		<link>http://digital-sushi.org/entry/declaration-site-extension-methods/#comment-913</link>
		<dc:creator>Axel Groß</dc:creator>
		<pubDate>Sat, 15 Dec 2007 13:09:05 +0000</pubDate>
		<guid isPermaLink="false">http://digital-sushi.org/entry/declaration-site-extension-methods/#comment-913</guid>
		<description>Hi Peter!

Hmm... maybe your approach was still too far reaching to be a simple change. Maybe making it even simpler would help:

I still think declaration site extensions could have its uses, if you completely forget about having some kind of inheritance available.

This would mean those methods are just available if an object is used through that specific interface/type declaration and thus could not have any  collisions with implementing/extending types.

package java.util;
interface List … { …
  void sort() import static java.util.Collections.sort; …
}
interface Sortable … {
  void sort() import static my.Helper.sort; …
}

class Evil2 implements Sortable, List … { … }
class Evil3 extends Evil2 {
  void sort(){ … } … 
}
List l = new Evil3();
l.sort(); // == Collections.sort(l);
((Sortable)l).sort(); // == Helper.sort(l);
((Evil3)l).sort(); // == Evil3#sort();
((Evil2)l).sort(); // COMPILE ERROR - Evil2#sort() doesnt exist;


If you wanted to 'inherit' the extension methods you would have to declare it by hand in inheriting interfaces (but if you want inheritance you should have made it part of the interface anyway ;) ).
This also could help in declaring functionality which should not be inherited.
So (bad) e.g. you could have a sort method for a general List but not for a sorted list.

package java.util;
interface List … { …
  ListIsSorted sort() import static at.mydomain.Collections.sort; …
}
interface ListIsSorted extends List {
  //no sort method at all …
}

List l = new ListImpl();
ListIsSorted lSorted = l.sort(); // == at.mydomain.Collections.sort(l);
// sort method is not needed for a list already sorted
lSorted.sort(); // COMPILE ERROR - interface SortedList has no method 'sort'; But supertype List has it as extension method.

I think this feature would be useful _and_ a simple change.</description>
		<content:encoded><![CDATA[<p>Hi Peter!</p>
<p>Hmm&#8230; maybe your approach was still too far reaching to be a simple change. Maybe making it even simpler would help:</p>
<p>I still think declaration site extensions could have its uses, if you completely forget about having some kind of inheritance available.</p>
<p>This would mean those methods are just available if an object is used through that specific interface/type declaration and thus could not have any  collisions with implementing/extending types.</p>
<p>package java.util;<br />
interface List … { …<br />
  void sort() import static java.util.Collections.sort; …<br />
}<br />
interface Sortable … {<br />
  void sort() import static my.Helper.sort; …<br />
}</p>
<p>class Evil2 implements Sortable, List … { … }<br />
class Evil3 extends Evil2 {<br />
  void sort(){ … } …<br />
}<br />
List l = new Evil3();<br />
l.sort(); // == Collections.sort(l);<br />
((Sortable)l).sort(); // == Helper.sort(l);<br />
((Evil3)l).sort(); // == Evil3#sort();<br />
((Evil2)l).sort(); // COMPILE ERROR - Evil2#sort() doesnt exist;</p>
<p>If you wanted to &#8216;inherit&#8217; the extension methods you would have to declare it by hand in inheriting interfaces (but if you want inheritance you should have made it part of the interface anyway <img src='http://digital-sushi.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ).<br />
This also could help in declaring functionality which should not be inherited.<br />
So (bad) e.g. you could have a sort method for a general List but not for a sorted list.</p>
<p>package java.util;<br />
interface List … { …<br />
  ListIsSorted sort() import static at.mydomain.Collections.sort; …<br />
}<br />
interface ListIsSorted extends List {<br />
  //no sort method at all …<br />
}</p>
<p>List l = new ListImpl();<br />
ListIsSorted lSorted = l.sort(); // == at.mydomain.Collections.sort(l);<br />
// sort method is not needed for a list already sorted<br />
lSorted.sort(); // COMPILE ERROR - interface SortedList has no method &#8217;sort&#8217;; But supertype List has it as extension method.</p>
<p>I think this feature would be useful _and_ a simple change.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Howard Lovatt</title>
		<link>http://digital-sushi.org/entry/declaration-site-extension-methods/#comment-900</link>
		<dc:creator>Howard Lovatt</dc:creator>
		<pubDate>Thu, 13 Dec 2007 22:25:21 +0000</pubDate>
		<guid isPermaLink="false">http://digital-sushi.org/entry/declaration-site-extension-methods/#comment-900</guid>
		<description>I have blogged about an alternative, with clauses:

http://www.artima.com/weblogs/viewpost.jsp?thread=220783

Typical usages are:

list -&#62; synchronizedList() -&#62; sort();
list -&#62; { add( 1, "A" ); add( 2, "B" ); };
Home home = new Builder() -&#62; { setWindows( windows ); setDoors( doors ); makeHome(); };</description>
		<content:encoded><![CDATA[<p>I have blogged about an alternative, with clauses:</p>
<p><a href="http://www.artima.com/weblogs/viewpost.jsp?thread=220783" rel="nofollow">http://www.artima.com/weblogs/viewpost.jsp?thread=220783</a></p>
<p>Typical usages are:</p>
<p>list -&gt; synchronizedList() -&gt; sort();<br />
list -&gt; { add( 1, &#8220;A&#8221; ); add( 2, &#8220;B&#8221; ); };<br />
Home home = new Builder() -&gt; { setWindows( windows ); setDoors( doors ); makeHome(); };</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Howard Lovatt</title>
		<link>http://digital-sushi.org/entry/declaration-site-extension-methods/#comment-857</link>
		<dc:creator>Howard Lovatt</dc:creator>
		<pubDate>Sat, 08 Dec 2007 00:48:04 +0000</pubDate>
		<guid isPermaLink="false">http://digital-sushi.org/entry/declaration-site-extension-methods/#comment-857</guid>
		<description>Peter,

Sure, start off with:

interface X {}
interface Y {}
class XY implements X, Y {}

Then change both X and Y to:

interface X { int m() { return 1; } }
interface Y { int m() { return 2; } }

And XY won't compile. But I think that is the behaviour you want. The feature allows you to add methods but within limits. And the limits are found by the compiler (or loader) and so you still retain static typing. Problems happen with other proposals, e.g. use-site:

import static XExtension; // XExtension defines m
import static YExtension; // YExtension also defines m
...
X xy1 = new XY();
Y xy2 = new XY();
XY xy3 = new XY();
xy1.m(); // calls X.m
xy2.m(); // calls Y.m
xy3.m(); // Error

Very confusing! They are all XYs after all! Not at all OO!

You can still compile XY, without an error, and a previously compiled XY will still run. Yes this is better from a compatibility point of view, but I think the  problems outweigh the advantages.

Declaration-site has the same problems as use-site, just different syntax (which does have advantages - but I am discussing method resolution). Scala style Mixins are very similar to Traits, except that the method to call in the case of a conflict is automatically resolved. So going back to your original example, when m is added to both X and Y using a Mixin:

class XY implements X, Y {}

Is still OK. The class loader adds Y.m to XY since Y is mixed in after X. This would give you the source compatibility you want, but I think an error is better (it will be a rare error and easily resolved and has the great advantage of clarity).

Cheers,

Howard.</description>
		<content:encoded><![CDATA[<p>Peter,</p>
<p>Sure, start off with:</p>
<p>interface X {}<br />
interface Y {}<br />
class XY implements X, Y {}</p>
<p>Then change both X and Y to:</p>
<p>interface X { int m() { return 1; } }<br />
interface Y { int m() { return 2; } }</p>
<p>And XY won&#8217;t compile. But I think that is the behaviour you want. The feature allows you to add methods but within limits. And the limits are found by the compiler (or loader) and so you still retain static typing. Problems happen with other proposals, e.g. use-site:</p>
<p>import static XExtension; // XExtension defines m<br />
import static YExtension; // YExtension also defines m<br />
&#8230;<br />
X xy1 = new XY();<br />
Y xy2 = new XY();<br />
XY xy3 = new XY();<br />
xy1.m(); // calls X.m<br />
xy2.m(); // calls Y.m<br />
xy3.m(); // Error</p>
<p>Very confusing! They are all XYs after all! Not at all OO!</p>
<p>You can still compile XY, without an error, and a previously compiled XY will still run. Yes this is better from a compatibility point of view, but I think the  problems outweigh the advantages.</p>
<p>Declaration-site has the same problems as use-site, just different syntax (which does have advantages - but I am discussing method resolution). Scala style Mixins are very similar to Traits, except that the method to call in the case of a conflict is automatically resolved. So going back to your original example, when m is added to both X and Y using a Mixin:</p>
<p>class XY implements X, Y {}</p>
<p>Is still OK. The class loader adds Y.m to XY since Y is mixed in after X. This would give you the source compatibility you want, but I think an error is better (it will be a rare error and easily resolved and has the great advantage of clarity).</p>
<p>Cheers,</p>
<p>Howard.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Ahé</title>
		<link>http://digital-sushi.org/entry/declaration-site-extension-methods/#comment-853</link>
		<dc:creator>Peter Ahé</dc:creator>
		<pubDate>Fri, 07 Dec 2007 21:08:09 +0000</pubDate>
		<guid isPermaLink="false">http://digital-sushi.org/entry/declaration-site-extension-methods/#comment-853</guid>
		<description>Howard,

Traits and Mixins are not the same.  Mixins do not allow multiple inheritance (although they provide the same level of code sharing as with multiple inheritance).

I'm not saying that your proposed syntax breaks existing programs.  The motivation for both kinds of extension methods is to mediate the fact that you cannot add a method to an interface without breaking source compatibility.  Replay your example in this order:

1. Declare interface X without any methods.
2. Declare interface Y without any methods.
3. Declare class XY without any methods.

Now, lets say you want to add a method m to interface X.  Then XY would fail to compile.  Your solution is to use traits.  Ignoring that we need to change the JVM so it copies method m from X to XY at load time (and work out some rules-- which I'm not sure would not have other compatibility problems-- for how the JVM does so), it solves the compatibility issue for now.

Then add method m to Y.  Now XY fails to compile (which was the entire point of your example).  This means that traits does not solve the problem of compatibly adding a method to an interface.

There is a similar problem with declaration-site extension methods.  I believe this can be controlled by issuing compile-time warnings and having a tie-break rule.  However, I'm seriously beginning to doubt this would be worth the hassle.

The lesson to learn is that there is no such thing as &lt;em&gt;simple&lt;/em&gt; language extension to Java.</description>
		<content:encoded><![CDATA[<p>Howard,</p>
<p>Traits and Mixins are not the same.  Mixins do not allow multiple inheritance (although they provide the same level of code sharing as with multiple inheritance).</p>
<p>I&#8217;m not saying that your proposed syntax breaks existing programs.  The motivation for both kinds of extension methods is to mediate the fact that you cannot add a method to an interface without breaking source compatibility.  Replay your example in this order:</p>
<p>1. Declare interface X without any methods.<br />
2. Declare interface Y without any methods.<br />
3. Declare class XY without any methods.</p>
<p>Now, lets say you want to add a method m to interface X.  Then XY would fail to compile.  Your solution is to use traits.  Ignoring that we need to change the JVM so it copies method m from X to XY at load time (and work out some rules&#8211; which I&#8217;m not sure would not have other compatibility problems&#8211; for how the JVM does so), it solves the compatibility issue for now.</p>
<p>Then add method m to Y.  Now XY fails to compile (which was the entire point of your example).  This means that traits does not solve the problem of compatibly adding a method to an interface.</p>
<p>There is a similar problem with declaration-site extension methods.  I believe this can be controlled by issuing compile-time warnings and having a tie-break rule.  However, I&#8217;m seriously beginning to doubt this would be worth the hassle.</p>
<p>The lesson to learn is that there is no such thing as <em>simple</em> language extension to Java.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Mahieu</title>
		<link>http://digital-sushi.org/entry/declaration-site-extension-methods/#comment-850</link>
		<dc:creator>Mark Mahieu</dc:creator>
		<pubDate>Fri, 07 Dec 2007 09:10:21 +0000</pubDate>
		<guid isPermaLink="false">http://digital-sushi.org/entry/declaration-site-extension-methods/#comment-850</guid>
		<description>Peter,

Wasn't sure whether to post this on your blog or Neal's, but anyway:

I've been playing around with implementations of methods like &lt;a href="http://markmahieu.blogspot.com/2007/12/currying-and-partial-application-with.html" rel="nofollow"&gt;curry()&lt;/a&gt; with the closures prototype, and have been wondering how best to deal with a couple of issues, namely:
	1) I need a different implementation of curry() for n argument functions to the implementation I need for n+1 argument functions.
	2) For each of these variations, I'd also want versions which work with primitive types as the arguments and/or result value.  Off the top of my head, I think this leads me to something like (9 to the power of (number of arguments + 1)) implementations of curry() for each number of arguments I want to cover.  Ouch.

There are a handful of other similar 'building block' methods with the same issues.  Writing all these implementations isn't particularly hard - I can write something else to generate them up to some arbitrary number of arguments, and I've been implementing them as static methods in a 'utility' class, ready for import static usage, but the above issues lead to some practical concerns regarding byte-code size, and usability with code completion features in IDEs.

Ideally I'd want curry() and friends to appear to be instance methods on a function type, but obviously they can't really be instance methods since function types are defined in terms of single-method interfaces.

Use-site extension methods get around that and make using them a little easier, but solve none of the practical issues.

It occurred to me that declaration site extension methods might offer a way though - the closures spec could conceivably define a handful of extension methods on each function type interface, for example javax.lang.function.OIO might look like:


public interface OIO { // system-generated

    R invoke(int x1, A2 x2) throws E;

    {int =&#62; {A2 =&#62; R}} curry() import static javax.lang.function.OIO.Extensions.curry;

    protected static class Extensions {
        static  {int =&#62; {A2 =&#62; R throws E}} curry({int, A2 =&#62; R throws E} fn) {
		return {int x1 =&#62; {A2 x2 =&#62; fn.invoke(x1, x2)}};
        }
    }
}


I'm not sure how nicely this plays with marker interfaces (such as RestrictedFunction), and the class Extensions should really be private to prevent the static curry method from 'leaking' into a closure literal's scope (Java 6 doesn't like import static from a private static inner class, for reasons I'm not sure of) - but maybe there's mileage in this; if these interfaces are to be generated by the VM at run-time (I believe that's the intention), then we only get as many implementations of curry (or whatever) as are needed, solving the practical issues in a stroke.

Of course the underlying implementation could be different from the above, as long as the function type interfaces can be described in terms of the standard language feature-set.

Mark</description>
		<content:encoded><![CDATA[<p>Peter,</p>
<p>Wasn&#8217;t sure whether to post this on your blog or Neal&#8217;s, but anyway:</p>
<p>I&#8217;ve been playing around with implementations of methods like <a href="http://markmahieu.blogspot.com/2007/12/currying-and-partial-application-with.html" rel="nofollow">curry()</a> with the closures prototype, and have been wondering how best to deal with a couple of issues, namely:<br />
	1) I need a different implementation of curry() for n argument functions to the implementation I need for n+1 argument functions.<br />
	2) For each of these variations, I&#8217;d also want versions which work with primitive types as the arguments and/or result value.  Off the top of my head, I think this leads me to something like (9 to the power of (number of arguments + 1)) implementations of curry() for each number of arguments I want to cover.  Ouch.</p>
<p>There are a handful of other similar &#8216;building block&#8217; methods with the same issues.  Writing all these implementations isn&#8217;t particularly hard - I can write something else to generate them up to some arbitrary number of arguments, and I&#8217;ve been implementing them as static methods in a &#8216;utility&#8217; class, ready for import static usage, but the above issues lead to some practical concerns regarding byte-code size, and usability with code completion features in IDEs.</p>
<p>Ideally I&#8217;d want curry() and friends to appear to be instance methods on a function type, but obviously they can&#8217;t really be instance methods since function types are defined in terms of single-method interfaces.</p>
<p>Use-site extension methods get around that and make using them a little easier, but solve none of the practical issues.</p>
<p>It occurred to me that declaration site extension methods might offer a way though - the closures spec could conceivably define a handful of extension methods on each function type interface, for example javax.lang.function.OIO might look like:</p>
<p>public interface OIO { // system-generated</p>
<p>    R invoke(int x1, A2 x2) throws E;</p>
<p>    {int =&gt; {A2 =&gt; R}} curry() import static javax.lang.function.OIO.Extensions.curry;</p>
<p>    protected static class Extensions {<br />
        static  {int =&gt; {A2 =&gt; R throws E}} curry({int, A2 =&gt; R throws E} fn) {<br />
		return {int x1 =&gt; {A2 x2 =&gt; fn.invoke(x1, x2)}};<br />
        }<br />
    }<br />
}</p>
<p>I&#8217;m not sure how nicely this plays with marker interfaces (such as RestrictedFunction), and the class Extensions should really be private to prevent the static curry method from &#8216;leaking&#8217; into a closure literal&#8217;s scope (Java 6 doesn&#8217;t like import static from a private static inner class, for reasons I&#8217;m not sure of) - but maybe there&#8217;s mileage in this; if these interfaces are to be generated by the VM at run-time (I believe that&#8217;s the intention), then we only get as many implementations of curry (or whatever) as are needed, solving the practical issues in a stroke.</p>
<p>Of course the underlying implementation could be different from the above, as long as the function type interfaces can be described in terms of the standard language feature-set.</p>
<p>Mark</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Howard Lovatt</title>
		<link>http://digital-sushi.org/entry/declaration-site-extension-methods/#comment-844</link>
		<dc:creator>Howard Lovatt</dc:creator>
		<pubDate>Thu, 06 Dec 2007 02:23:30 +0000</pubDate>
		<guid isPermaLink="false">http://digital-sushi.org/entry/declaration-site-extension-methods/#comment-844</guid>
		<description>Re Traits and Mixins

Nothing greatly against mixins, I prefer the flat nature of traits and the more explicit conflict resolution. Mixins would essentially be the same in Java, they could even have the same syntax, the only difference would be that class XY implements X,Y {} would automatically get a Y.foo since Y was mixed in last. Either would be good :)

Where does the proposed syntax break old code? Isn't everything proposed currently a syntax error? What have I missed?

The implementation technique proposed for traits (class loader adds methods) could be used to allow the user to add methods also (Josh Bloch's point that it would be nice if the user of an API could add methods). EG:

extension MyList extends List {
  sort() { .... };
}

Then in the main class (or at least before List is used):

import MyList; // Not only tells the compiler to use MyList in the file but also extends List at runtime - file that imports MyList must be loaded before a file that uses List - OK to multiply import MyList</description>
		<content:encoded><![CDATA[<p>Re Traits and Mixins</p>
<p>Nothing greatly against mixins, I prefer the flat nature of traits and the more explicit conflict resolution. Mixins would essentially be the same in Java, they could even have the same syntax, the only difference would be that class XY implements X,Y {} would automatically get a Y.foo since Y was mixed in last. Either would be good <img src='http://digital-sushi.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Where does the proposed syntax break old code? Isn&#8217;t everything proposed currently a syntax error? What have I missed?</p>
<p>The implementation technique proposed for traits (class loader adds methods) could be used to allow the user to add methods also (Josh Bloch&#8217;s point that it would be nice if the user of an API could add methods). EG:</p>
<p>extension MyList extends List {<br />
  sort() { &#8230;. };<br />
}</p>
<p>Then in the main class (or at least before List is used):</p>
<p>import MyList; // Not only tells the compiler to use MyList in the file but also extends List at runtime - file that imports MyList must be loaded before a file that uses List - OK to multiply import MyList</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Howard Lovatt</title>
		<link>http://digital-sushi.org/entry/declaration-site-extension-methods/#comment-843</link>
		<dc:creator>Howard Lovatt</dc:creator>
		<pubDate>Thu, 06 Dec 2007 00:09:17 +0000</pubDate>
		<guid isPermaLink="false">http://digital-sushi.org/entry/declaration-site-extension-methods/#comment-843</guid>
		<description>Re. use-site extensions, Josh Bloch is of course right in saying that the trait/mixin/declaration-site aren't as flexible &lt;em&gt;[NOTE from Peter: Josh did not express an opinion on traits or mixins]&lt;/em&gt;. But I am not totally convinced about the extension mechanism as proposed - maybe I need to know more about it. My particular concerns are:

1. They look like they do dynamic dispatch, but they don't.
2. They have a limited use case - statically imported static methods

Perhaps -&#62; could be used and that this notation is for the first argument of *any* method regardless of how its name is made available and this first argument *includes* the hidden this of instance methods. Therefore you could write:

list -&#62; filter( test1 ) -&#62; filter( test2 ); // static void filter(List, Predicate) is statically imported

list1 -&#62; addAll( list 2 ) -&#62; addAll( list3 ); // addAll(List) is an instance method in List

The above notation is similar to the builder notation, also proposed for Java 7 (new X().setProp1().setProp2() where the props return void) and is meant to combine the two proposals. The same as the builder proposal; the value of the second statement above is list1.addAll( list3 ). Different than the builder proposal; the intermediate values, e.g. list1.addAll( list2 ), are always discarded.

Stephen Colebourne has suggested something similar but proposed .do. instead of -&#62; and didn't include the original argument getting passed to all the methods, i.e in the second example above list1 is given to both addAlls.</description>
		<content:encoded><![CDATA[<p>Re. use-site extensions, Josh Bloch is of course right in saying that the trait/mixin/declaration-site aren&#8217;t as flexible <em>[NOTE from Peter: Josh did not express an opinion on traits or mixins]</em>. But I am not totally convinced about the extension mechanism as proposed - maybe I need to know more about it. My particular concerns are:</p>
<p>1. They look like they do dynamic dispatch, but they don&#8217;t.<br />
2. They have a limited use case - statically imported static methods</p>
<p>Perhaps -&gt; could be used and that this notation is for the first argument of *any* method regardless of how its name is made available and this first argument *includes* the hidden this of instance methods. Therefore you could write:</p>
<p>list -&gt; filter( test1 ) -&gt; filter( test2 ); // static void filter(List, Predicate) is statically imported</p>
<p>list1 -&gt; addAll( list 2 ) -&gt; addAll( list3 ); // addAll(List) is an instance method in List</p>
<p>The above notation is similar to the builder notation, also proposed for Java 7 (new X().setProp1().setProp2() where the props return void) and is meant to combine the two proposals. The same as the builder proposal; the value of the second statement above is list1.addAll( list3 ). Different than the builder proposal; the intermediate values, e.g. list1.addAll( list2 ), are always discarded.</p>
<p>Stephen Colebourne has suggested something similar but proposed .do. instead of -&gt; and didn&#8217;t include the original argument getting passed to all the methods, i.e in the second example above list1 is given to both addAlls.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Ahé</title>
		<link>http://digital-sushi.org/entry/declaration-site-extension-methods/#comment-842</link>
		<dc:creator>Peter Ahé</dc:creator>
		<pubDate>Wed, 05 Dec 2007 23:58:58 +0000</pubDate>
		<guid isPermaLink="false">http://digital-sushi.org/entry/declaration-site-extension-methods/#comment-842</guid>
		<description>Howard,

I do believe that it is possible to implement traits.  I just don't think it would be a good idea to implement traits, because I'm concerned about compatibility and I like mixins better :-)

Your examples break at least source compatibility.</description>
		<content:encoded><![CDATA[<p>Howard,</p>
<p>I do believe that it is possible to implement traits.  I just don&#8217;t think it would be a good idea to implement traits, because I&#8217;m concerned about compatibility and I like mixins better <img src='http://digital-sushi.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Your examples break at least source compatibility.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Howard Lovatt</title>
		<link>http://digital-sushi.org/entry/declaration-site-extension-methods/#comment-840</link>
		<dc:creator>Howard Lovatt</dc:creator>
		<pubDate>Wed, 05 Dec 2007 23:51:18 +0000</pubDate>
		<guid isPermaLink="false">http://digital-sushi.org/entry/declaration-site-extension-methods/#comment-840</guid>
		<description>Oops I said the *compiler* automatically supplies the methods. I meant the *class loader*. Sorry.</description>
		<content:encoded><![CDATA[<p>Oops I said the *compiler* automatically supplies the methods. I meant the *class loader*. Sorry.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
