Pattern Matching and null references

Mike Duigou openjdk at duigou.org
Thu Aug 3 01:12:16 UTC 2017


Reviewing the JEP 305 document and Brian's talk today at JVMLS I did not 
find any examples of the intended handling of pattern matching with null 
references. I would be happy if the answer was "Well, we are finally 
going to provide non-nullable references and pattern matching only works 
with those" but suspect that there is probably a different answer. I 
still find the non-handling of null by enum-switch and String-switch to 
be unfortunate warts and would like to see a better answer for 
pattern-matching switch.

Cheers,

Mike


More information about the amber-dev mailing list