more background to List<int> specializing List<Any>

Stephen Colebourne scolebourne at joda.org
Mon Jan 5 01:18:13 UTC 2015


On 5 January 2015 at 00:44, Gavin King <gavin.king at gmail.com> wrote:
> How strong of an objection this is depends upon how often you think
> value objects will occur compared to primitives. That's a question
> I've been turning over in my head the last couple of days, without
> being able to really arrive at a firm conclusion by intuition alone.

Given that Java has no convenient bean/property support but value
types will likely provide an equals/hashCode/toString, I believe that
they will be widely used as domain objects, even for objects way
bigger than the size sweet-spot of value types. This opinion make me
more concerned about how they interoperate with libraries pre-JDK
10/11.

Stephen
PS. On List<int> vs List<Integer> I'm sure you're right...


More information about the valhalla-dev mailing list