4 ms·
newb here -- please expand more on this. Are there stuff that kotlin's pattern-matching can't do?
by high_density 5y ago
newb here -- please expand more on this.
Are there stuff that kotlin's pattern-matching can't do?
- valenterry 5y agoYou can find some discussion and good examples here: https://discuss.kotlinlang.org/t/destructuring-in-when/2391/7 https://discuss.kotlinlang.org/t/destructuring-in-when/2391/...
- MrPowers 5y agoHere'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 https://www.quora.com/profile/Reynold-Xin