Expression switch exception naming
Kevin Bourrillion
kevinb at google.com
Fri Mar 30 18:55:09 UTC 2018
On Fri, Mar 30, 2018 at 11:39 AM, Brian Goetz <brian.goetz at oracle.com>
wrote:
Okay, that is a sane approach, but I think it leaves too much of the value
>> on the floor. I often benefit from having my exhaustiveness validated and
>> being able to find out at compile time if things change in the future.
>>
>
> To be clear, I was describing:
> - We'd always do exhaustiveness checking for expression switches
> - A default / total pattern always implies exhaustive
> - We'd additionally consider an expression switch to be exhaustive if all
> known enums are present _and_ the enum type is in the same module as the
> switch
>
Confirming that this is indeed how I understood it. I think it throws too
much value out.
--
Kevin Bourrillion | Java Librarian | Google, Inc. | kevinb at google.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20180330/70a98895/attachment.html>
More information about the amber-spec-experts
mailing list