🌿 Kotlin: No IF-ELSE statement?!
📜 Statements 🧮 Expressions 🧘 The importance of the Expression vs Statement distinction 📝 Conclusion ☕ Buy me a coffee This post highlights the great practice of programming languages that are expressive and how they avoid the design flaw of statements used in languages like Java, C# and GO. It gives a deeper meaning to the everyday if code you are so used to writing by now. In Kotlin there are no if statements. And there’s a good reason why. Kotlin is a functional expressive language, and that’s why if is treated as an expression instead of a statement. Inspired by languages like Haskell, Ruby and the beloved Rust they all have in common that they treat their ifs as expressions. ...