Thoughts on peeling and readability
Brian Goetz
brian.goetz at oracle.com
Sat Dec 12 17:20:45 UTC 2015
Precise layout and bit control of values are anti-goals of Valhalla, so
we're not really exploring this direction at this time.
The problem with approaches like the one you suggest is they fall apart
as soon as you leave the realm of "primitives modeled as values." What
about values that have refs in them? What about values whose
representations are private? Their implementation is supposed to be in
sole control of their representation. This runs contrary to the "codes
like a class" dictum.
On 12/12/2015 4:43 AM, Timo Kinnunen wrote:
> Hi,
>
> One thing that I don’t remember seeing is any syntax for constructing arbitrary values in generic code without having to know about the precise field layouts and what the meaning of such fields is. Something like T.default but for values other than 0. Perhaps T.default(12345) or some such?
>
> Or maybe this is slated to go with bytecode type specialization… What sort of syntax is envisioned to be driving that anyways?
>
>
>
>
>
More information about the valhalla-dev
mailing list