Proposal: Large arrays
Joe Darcy
Joe.Darcy at Sun.COM
Tue Mar 24 14:58:11 PDT 2009
On 03/24/09 02:38 PM, Reinier Zwitserloot wrote:
> Arrays are extremely ugly. They don't follow java's usual semantics at
> all; they have a read-only field, which java normally doesn't have. I
> don't actually consider 'length' a field at all. "length" just happens
> to be java's first context sensitive keyword. They don't have a
> sensible toString(), which is, well, "stupid" is being too kind,
> really. Their type system is broken (covariance, which is wrong, see
> generics), with a patchy runtime hack to make sure you can't actually
> crash the JVM with it. They are extremely hard to use because they
> don't grow on demand, and they have 0 useful methods, though some of
> them have been squirreled away in java.util.Arrays.
>
... which is generally why I favor letting collection-like types use the
bracket notation to get and set elements. That would eliminate the
syntactically advantages of arrays.
-Joe
More information about the coin-dev
mailing list