Hacker News new | past | comments | ask | show | jobs | submit login

newb here -- please expand more on this.

Are there stuff that kotlin's pattern-matching can't do?




Here's a quote from Reynolds, one of the creators of Spark:

> The primary issue I can think of comes from the lack of pattern matching. Kotlin’s language designer left out pattern matching intentionally because it is a complex feature whose use case is primarily for building compilers. However, modern Spark (post Catalyst / Tungsten) look a lot like compilers and as a result the internals would become more verbose if built using a language that doesn't support pattern matching.

Source: https://www.quora.com/profile/Reynold-Xin


You can find some discussion and good examples here: https://discuss.kotlinlang.org/t/destructuring-in-when/2391/...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: