JEP-360 Sealed types and non-accessible subtypes
Brian Goetz
brian.goetz at oracle.com
Sun Dec 1 20:24:48 UTC 2019
> So it looks like the best practice for API designers is to _always_ add a non-public permitted subtype to force clients to implement default case.
No, that would be utterly TERRIBLE advice. In the same category of bad advice as “to avoid ingrown toenails, chop off your foot.” So, no. Not a best practice, not even a good practice — candidate for a worst practice, actually.
More information about the amber-dev
mailing list