Comparing ranges with switch
Red IO
redio.development at gmail.com
Wed Mar 13 12:16:21 UTC 2024
The switch statement saw a huge transformation over the past few releases.
So I was quite surprised to realize that the current switch construct can't
check the range of an value.
Example case x is between y and z.
I'm most likely not the first one to notice that. Is there any discussion
about adding some sort of range pattern? Would fit in the notion of the
switch checking patterns quite well.
Great regards
RedIODev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20240313/fefcb6b5/attachment.htm>
More information about the amber-dev
mailing list