[patterns] on treatment of null

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Fri Jul 7 12:56:52 UTC 2017


Hi,
over the last few weeks we've been exploring the twisted relationship 
between patterns and nulls. This document:

http://cr.openjdk.java.net/~mcimadamore/nulls-patterns.html

provides some (hopefully helpful) insights into what the design space 
looks like.

tl;dr;

Looks like trying to force the same rule on all patterns, regardless of 
where they appear, leads to problems. Distinguishing between toplevel 
and nested patterns provides a good basis to handle null in a more 
predictable/flexible fashion.



More information about the amber-spec-experts mailing list