3 ms·
IMO Java's pattern matching is still fairly primitive. Not even up to the level of usefulness of Scala 2.13.
by kelnos 2y ago
IMO Java's pattern matching is still fairly primitive. Not even up to the level of usefulness of Scala 2.13.
- CraigJPerry 2y agoInteresting - what specifically is missing? I’m thinking we’ve got all of scala’s pattern matching since JEP 406 (2021) but I don’t write Scala so there’s maybe a feature i don’t know. Would be interested to know. switch (thing) { case Integer i when i > 0 -> println(“Positive…”); case … }