Foo / Foo.ref is a backward default; should be Foo.val / Foo

Kevin Bourrillion kevinb at google.com
Tue Apr 26 21:14:49 UTC 2022


On Tue, Apr 26, 2022 at 5:11 PM Kevin Bourrillion <kevinb at google.com> wrote:

Nice question! I thought about it a little bit and this is my own first
> take. I think *most* of the advice would be cross-cutting across param
> types, return types, field types, etc.:
>
> If
> 1. I don't want null to be included as a value
> 2. I'm definitely not abusing some value as a fake "pseudo-null" sentinel
> 3. (for a value I'm declaring) I'm willing to take care that it gets
> initialized properly
> 4. I'm properly chastened about racy access
>

For a field type, or especially for the type argument of a collection (cpt
type of an array), I might entertain *some* extent of #2 "abuse", with
great caution.


-- 
Kevin Bourrillion | Java Librarian | Google, Inc. | kevinb at google.com


More information about the valhalla-spec-observers mailing list