3 ms·
Java 21's pattern matching (you don't need functionaljava, and shouldn't really use that unless you're really into FP) is kind of nicer than Kotlin's, because y
by brabel 2y ago
Java 21's pattern matching (you don't need functionaljava, and shouldn't really use that unless you're really into FP) is kind of nicer than Kotlin's, because you can automatically "destruct" records in your matches.
For Java, see https://www.baeldung.com/java-lts-21-new-features https://www.baeldung.com/java-lts-21-new-features
Kotlin's: https://www.baeldung.com/kotlin/when https://www.baeldung.com/kotlin/when
Make up your own mind.
- ackfoobar 2y ago> kind of nicer than Kotlin's, because you can automatically "destruct" records in your matches. I find positional destructuring of records a bad idea. https://news.ycombinator.com/item?id=31399737 https://news.ycombinator.com/item?id=31399737
- deleted 2y ago[deleted]