Glue classes proposal 0.9

Joseph D. Darcy Joe.Darcy at Sun.COM
Sun Mar 22 23:43:59 PDT 2009


Jeremy Manson wrote:
> I believe that what Marek is trying to do is to introduce a feature
> that allows you to add (or glue) methods to existing classes.  You
> could have, for example:
>
> // Glue class to add sorting to Lists
> class Sort<T> glue(List<T>) {
>   void sort(List<T> l) {
>     // sorts the argument
>   }
> }
>
> And then later say:
>
> List<Integer> list = new ArrayList<Integer>();
> // adds elements to list
> list..sort();  // The ".." notation invokes Sort.sort() on list.
>
> It seems like rather a large change to me, and is along the same lines
> as some other proposals that have been rejected as out of scope.  But
> perhaps Joe thinks otherwise
>   

I remain perplexed by the impenetrable text of the proposal.

If the feature is as you've described, it is too large to be a coin.

-Joe



More information about the coin-dev mailing list