Nullity (was: User model stacking: current status)
Kevin Bourrillion
kevinb at google.com
Thu May 26 17:12:56 UTC 2022
Returning to this thread and going up a level or two:
The real impact of this discussion, imho, should not be "now let's rush a
declarative nullness feature out asap", or even "let's solve bucket 3 now
in a way nullness will have to be harmonious with later". What I humbly
suggest it points to is, maybe: "let's shift focus right now to delivering
just bucket 2 asap, so that we keep our options open longer for the rest".
Is that fair? It seems like a very good plan to me. Bucket 2 is pretty
non-invasive to the language model and still improves matters for Integer.
Thoughts?
On Thu, May 12, 2022 at 3:14 PM Kevin Bourrillion <kevinb at google.com> wrote:
> I don't see the conflict. I'm saying, yeah, there *will* be exclamation
> fatigue until a feature comes along eventually to relieve it. (In the worst
> case, that's `public null-marked class...`; in the best case it's just
> `language-level 22;` or what have you.) But I still think it's the right
> thing to do anyway.
>
>
> On Thu, May 12, 2022 at 10:18 AM Brian Goetz <brian.goetz at oracle.com>
> wrote:
>
>>
>>
>> >> * Exclamation fatigue would be very real, so assume there is some way
>> to make `!` the default for some scope
>> > +1
>> >
>> > Yes, I think it's a dead end to expect users to sprinkle '!' everywhere
>> they don't want nulls—this is usually the informal default in common
>> programming practice, so we need some way to enable flipping the default.
>>
>> On the other hand, this is on a collision course with Kevin's
>> "ref-default" recommendation, which had many strong supporting reasons,
>> whether this is spelled `!` or `.val`. The "but it will be tiring for
>> people to type" doesn't feel like a very good reason to flip the default
>> from something that has such strong objective justifications.
>>
>> (Dan was never sold on ref-default, but Kevin was, so I'll leave it to
>> him to reconcile "ref-default is the right default" with "but,
>> exclamation fatigue.")
>>
>
>
> --
> Kevin Bourrillion | Java Librarian | Google, Inc. | kevinb at google.com
>
--
Kevin Bourrillion | Java Librarian | Google, Inc. | kevinb at google.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/valhalla-spec-experts/attachments/20220526/b386ef1b/attachment.htm>
More information about the valhalla-spec-experts
mailing list