Updated State of the Specialization
Brian Goetz
brian.goetz at oracle.com
Sun Dec 21 15:31:31 UTC 2014
>> We've not yet settled on whether user-defined value types can define
>> their own default value,
> How will this work if you have e. g. an Array of value-type T ... will
> you go through the whole array and initialize it to the default value
> after allocation? Or require extra bits to track which elements have
> been initialized already?
Which is exactly why we are wary of the "user-defined default value"
feature -- even though nearly everyone who reads the value-type proposal
in some depth suggests it as a desirable feature within the first few
hours. It is a feature that seems very attractive from the "here's the
source code I want to write" perspective, but challenging from the "how
does the VM implement it efficiently" perspective.
More information about the valhalla-dev
mailing list