April 2018
Intermediate to advanced
910 pages
33h 21m
English
Generic specialization is, perhaps, a bit easier to understand. Currently, generic type variables can hold only reference types. For example, you can create a List<Integer>, but not a List<int>. There are some pretty complex reasons why this is so, but being able to use primitives, and value types, would make collections more efficient in terms of memory and computation. You can read more about this feature in this document from, again, Brian Goetz--http://cr.openjdk.java.net/~briangoetz/valhalla/specialization.html. Jesper de Jong also has a good write-up about the complexities of primitives in generic type variables here:
http://www.jesperdj.com/2015/10/12/project-valhalla-generic-specialization/