Valhalla basic concepts / terminology
Brian Goetz
brian.goetz at oracle.com
Wed Jun 10 16:15:20 UTC 2020
FWIW, one of the things that made this take so long is that there are a
number of related dichotomies, which we kept trying to collapse together
(or use the wrong one):
- primitive type vs reference type
- primitive vs class
- inline class vs identity class
- pass/store by reference vs pass/store by value
- nullable vs non-nullable
- direct vs indirect
On 6/10/2020 11:20 AM, Dan Smith wrote:
>> On Jun 9, 2020, at 6:00 PM, Brian Goetz <brian.goetz at oracle.com> wrote:
>>
>>> - The syntax ".val" used to denote an "inline type" is a bit of a mismatch. Maybe we want a new syntax. Or maybe we want to rework the word "value" into the story so that "inline type" becomes "value type".
>>>
>>> This was my reaction too. ".val" means "the value itself, that you care about", and ".ref" means "a reference value that points to the value you care about", but I used the word "value" more times in the second phrase. It doesn't feel like this will be clear.
>> My intention here was to appeal to terms many users already understand: pass by value and pass by reference. That's why `V.val` is not `V.inline`.
> Sure. And maybe that value/reference dichotomy can be extended into the terms we use in the model. So, the "values" of the language (using the term formally) are *values* (objects) and *references to values*. Now there's a nice alignment between the syntax and the terminology.
>
> Or given that "objects" parenthetical, maybe "object" is the right term: the values of the language are *objects* and *references to objects*. In that case, maybe the syntax should be 'Foo.obj'. The objects themselves, not references.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/valhalla-spec-experts/attachments/20200610/07feff94/attachment.htm>
More information about the valhalla-spec-experts
mailing list