I agree that Bucket 2 is largely uncontroversial (and largely implemented) and makes a sensible unit of delivery -- with the proviso that we need to properly message that it will not yet deliver the performance improvements that most users are hoping to get out of Valhalla. There'll be no heap flattening, and no user-definable primitives.  There'll be improved optimization for on-stack values (which will appear to most users as "better escape analysis").

That said, I don't think this reduces the urgency to find a bucket-3 *design* that we like.

On 5/26/2022 1:12 PM, Kevin Bourrillion wrote:
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 <kev...@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.go...@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. |kev...@google.com



--
Kevin Bourrillion | Java Librarian | Google, Inc. |kev...@google.com

Reply via email to