Draft JEP on records and sealed types

Brian Goetz brian.goetz at oracle.com
Thu Apr 25 13:32:43 UTC 2019


> reviewed !
> there are two gray areas, how to have several public records in one compilation unit and what is exactly an extractor ?

On the first, we went around a few times, and I think I’m convinced we don’t need to do anything special here, at least until we get to pattern matching in switch.  Nesting is fine; static import helps; we can consider a similar thing for type patterns of sealed types as we do for enums, where we allow the outer class to be omitted when switching over a sealed type with inner subtypes.  

An extractor is the implementation of a pattern.  We don’t yet have hard terminology for this, so this can be rewritten to “support for deconstruction patterns” until then.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20190425/c2116b4e/attachment.html>


More information about the amber-spec-experts mailing list