I am having trouble understanding the purpose of Unconditional Patterns

David Alayachew davidalayachew at gmail.com
Mon Jan 2 17:29:14 UTC 2023


Hello Brian,

I appreciate the context for how unconditionality plays with instance of
and switch. There's a lot more depth than what appears on the surface.

> As I said, the warning is  confusingly worded, and will go away when we
exit preview (which is hopefully soon.)

Whoops, I understand now. So, since unconditionality has been ironed out,
what I was trying to do will likely will be the final implementation of
unconditional patterns. However, unconditional patterns are still a preview
feature, hence the warning. That has nothing to do with the fact that
instanceof pattern matching has long since exited preview. These are 2
different things. I understand now, thank you.

Is there somewhere on the JEP 0 website or somewhere else where we can read
more on this? I am so used to seeing a JEP for these, so my assumption that
there would be some JEP to delineate this added to my confusion.

Thank you for the help and clarification!
David Alayachew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20230102/5e483209/attachment-0001.htm>


More information about the amber-dev mailing list