Is it feasible for Exhaustiveness Checks to tell us what we are missing? At least in some cases?

David Alayachew davidalayachew at gmail.com
Tue Jan 30 04:11:23 UTC 2024


Hello Amber Dev Team,

The previous discussions on Checked Exceptions reminded me about this.

Is there any possible future where sealed types will be able to tell you
which permitted subtypes are missing?

This is actually one of the sleeper features of Checked Exceptions -- they
don't just give you exhaustiveness, they are even nice enough to tell you
exactly which Exception type you left out.

This is a godsend for maintenance, fearless refactoring, and general
correctness.

Any chance we could get this for sealed types in the future?

Thank you for your time and help!
David Alayachew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20240129/50fb4baf/attachment.htm>


More information about the amber-dev mailing list