Hi all, I'm kotlin beginner, regarding the "when e...
# getting-started
c
Hi all, I'm kotlin beginner, regarding the "when expression", is it just a powerful switch case, or does pattern matching also? You can only check types/values or you can destructure variables also? Use of when expression with sealed classes almost look like it may be some form of pattern matching expression?
d
You can do matching on types and then destructure, but it's not true pattern matching.
c
Got it, Thanks.