3 ms·
> Kotlin’s syntax is also weird/quirky in some ways. I'm curious to learn what you mean by this! :)
by bartekpacia 2y ago
> Kotlin’s syntax is also weird/quirky in some ways.
I'm curious to learn what you mean by this! :)
- cosmic_cheese 2y agoNo terenary if and the elvis operator, for one. Stuff like that trips me up frequently when jumping between Kotlin and Swift/other C-likes.
- koakuma-chan 2y agoIf expression: https://kotlinlang.org/docs/control-flow.html#if-expression https://kotlinlang.org/docs/control-flow.html#if-expression Elvis operator: https://kotlinlang.org/docs/null-safety.html#elvis-operator https://kotlinlang.org/docs/null-safety.html#elvis-operator
- bartekpacia 2y agoAh, I see. Tbh, I actually like the lack of ternary and elvis, they are nicely handled by if expression (as the other comment notes)