<div dir="auto">Hello Amber Dev Team,<div dir="auto"><br></div><div dir="auto"><div dir="auto">In the Record patterns section of the link (little more than halfway down). It says the following quote.</div><div dir="auto"><br></div><div dir="auto">---</div><div dir="auto"><br></div><div dir="auto">The null value does not match any record pattern.</div><div dir="auto"><br></div><div dir="auto">---</div><div dir="auto"><br></div><div dir="auto">I understand that this is relatively clear and simple enough to understand, but in the name of explicitness and beginner-friendlyness, could we add something like this? I understand that it is redundant, but this extra effort will help uproot a lot of the misinformation that people will inevitably come up with.</div><div dir="auto"><br></div><div dir="auto">---</div><div dir="auto"><br></div><div dir="auto">The null value does not match any record pattern. For example, the following code will print "No match".<br></div><div dir="auto"><br></div><div dir="auto">record Point(Integer x, Integer y) {}</div><div dir="auto">enum Color { RED, GREEN, BLUE; }</div><div dir="auto">record ColoredPoint(Point p, Color c) {}</div><div dir="auto"><br></div><div dir="auto">ColoredPoint cp = null;</div><div dir="auto"><br></div><div dir="auto">if (cp instanceof ColoredPoint(Point(Integer x, Integer y), Color c)) {</div><div dir="auto">    System.out.println("Match 1! x = " + x + " and y = " + y + " and c = " + c);</div><div dir="auto">} else if (cp instanceof ColoredPoint(Point p, Color c)) {</div><div dir="auto">    System.out.println("Match 2! p = " + p + " and c = " + c);</div><div dir="auto">} else {</div><div dir="auto">    System.out.println("No match");</div><div dir="auto">}</div><div dir="auto"><br></div><div dir="auto">However, if we change cp to be the following</div><div dir="auto"><br></div><div dir="auto">cp = new ColoredPoint(null, null);</div><div dir="auto"><br></div><div dir="auto">then the output would be "Match 2! p = null and c = null".</div><div dir="auto"><br></div><div dir="auto">And if we change cp to be the following</div><div dir="auto"><br></div><div dir="auto">cp = new ColoredPoint(new Point(null, null), null);</div><div dir="auto"><br></div><div dir="auto">then the output would be "Match 1! x = null and y = null and c = null"</div><div dir="auto"><br></div><div dir="auto">---</div><div dir="auto"><br></div><div dir="auto">I understand that it feels excessive, but this level of clarity and explicitness makes reasoning about the rest of the JEP a lot easier. null is always at the back of my mind, so having explicit examples of how it plays with the new features clears up the ambiguity and makes understanding the new features that much easier.</div><div dir="auto"><br></div><div dir="auto">Thank you for your time!</div><div dir="auto">David Alayachew</div></div></div>