Pattern Matching for Switch Expressions feedback
Nir Lisker
nlisker at gmail.com
Wed Oct 20 23:11:31 UTC 2021
Hi,
I've used pattern matching in switch expressions in my codebase. While my
use cases are simple (no need to deal with nulls and ordering due to 2
patterns potentially matching), I can say that it works well. My biggest
request is to be able to differentiate between parametric types:
case List<Integer> -> ...
case List<String> -> ...
I've seen some discussion on this previously on the mailing list, but not a
conclusion. Is this something that can be addressed in this JEP? Is it
planned for a future change outside of this JEP?
- Nir
More information about the amber-dev
mailing list