You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by Benson Margulies <bi...@gmail.com> on 2009/12/22 16:49:10 UTC

Proposed changed to Colt design for ArrayLists

I've noticed Something Odd about the Colt design. For the
PrimitiveArrayList classes, they are made to implement List over the
corresponding capitalized type. E.g. AbstractIntList extends
AbstractList<Integer>.

I think that this is confusing and pointless. Instead of a nice clean
API that looks more or less just list ArrayList with 'int', it has the
mush of Integer and int.

I propose to rip all of this out (and generate all the XxxArrayLists).

Does this upset anyone in prospect?

Re: Proposed changed to Colt design for ArrayLists

Posted by Drew Farris <dr...@gmail.com>.
I agree that it makes sense to get rid of them. Auto-boxing/unboxing
is really really slow, and as a result of extremely limited
usefulness.

Re: Proposed changed to Colt design for ArrayLists

Posted by Sean Owen <sr...@gmail.com>.
I don't think it's necessarily pointless, since it provides the most
logical possible integration with standard library classes, and that
could be useful. With auto-boxing/unboxing, it makes these things
iterable with foreach, etc.

But doing those sorts of things does defeat the purpose, probably, of
using primitives only. So taking away those convenience methods seems
OK.

On Tue, Dec 22, 2009 at 3:49 PM, Benson Margulies <bi...@gmail.com> wrote:
> I've noticed Something Odd about the Colt design. For the
> PrimitiveArrayList classes, they are made to implement List over the
> corresponding capitalized type. E.g. AbstractIntList extends
> AbstractList<Integer>.
>
> I think that this is confusing and pointless. Instead of a nice clean
> API that looks more or less just list ArrayList with 'int', it has the
> mush of Integer and int.
>
> I propose to rip all of this out (and generate all the XxxArrayLists).
>
> Does this upset anyone in prospect?
>