https://kotlinlang.org logo
#functional
Title
# functional
m

Milse113

11/16/2021, 6:51 PM
Hey y’all. I know that the discussion of adding pattern matching into Kotlin has been talked about before, and decided against. However now that Java 17 is introducing pattern matching into Java, are there any renewed discussions of Kotlin following suit? The lack of pattern matching in Kotlin is probably my main complaint in the language, and its introduction into Java and its presence in Scala make me inclined to switch
👍 1
s

simon.vergauwen

11/16/2021, 6:57 PM
It’s been mentioned in the 10 years Kotlin video, but it’s not on the roadmap afaik
It’s very vague though, not details on what or how it might look
m

Milse113

11/16/2021, 6:58 PM
Ah well that sucks. The good news is that the syntax is already mostly in place thanks to
when
. Its just a matter of introducing destructuring
a

Astronaut4449

11/20/2021, 7:47 AM
Currently destructuring is positional only. There are thoughts about introducing name based restructuring. I guess this topic has to her settled first.
e
6 Views