Reader mail bag
Brian Goetz
brian.goetz at oracle.com
Mon Apr 20 18:22:08 UTC 2020
Some comments have come in on the `InlineObject` discussion:
>
> Subject: IdentityObject and InlineObject
> Date: Sun, 19 Apr 2020 11:46:40 +0200
> From: Raffaello Giulietti <raffaello.giulietti at gmail.com>
> To: valhalla-spec-comments at openjdk.java.net
>
>
>
>
> Hello,
>
> getting rid of InlineObject means that static or dynamic queries for
> inline types need to rely on complementarity: an object is inline if
> it is not identity (except perhaps for an instance of Object, which is
> neither in the type system as I understand it).
>
> Should a third kind of objects beside identity and inline be invented
> in the future (quantum objects? who knows?), complementarity
> ("non-identity") alone would no longer suffice as a test for inline.
>
> As the benefits of giving up InlineObject seem low when compared to
> the costs of re-introducing it in the some future, I like the
> explicitness of the current dichotomy better. It gives the
> programmers, rather than the language designers, the choice of
> complementarity versus explicitness.
>
> So, either it is provable that the inline-identity dichotomy is here
> to stay forever (a theorem in computer science, so to say), or I would
> keep InlineObject as a reasonably priced investment for the future,
> even if it is felt as extra luggage today.
>
>
> Greetings
> Raffaello
>
While I understand that there might be a future use where we want it
after all, the real question is how to model it. The current
Inline/Identity duality is unsatisfying because what it really would
want to capture is the "it's either one or the other", but we don't
actually capture that. The alternative, which is being explored, is to
say "there are some operations that you can do on all objects, and then
some you can only do on identity objects."
If you want to follow up, start a new thread.
More information about the valhalla-spec-observers
mailing list