4 ms·
It's not outdated, it depends on context. Several modern languages, including Rust, Swift, Scala, Kotlin, and F# are built around having expressions as construc
by apta 7y ago
It's not outdated, it depends on context. Several modern languages, including Rust, Swift, Scala, Kotlin, and F# are built around having expressions as constructs (if, match, try, etc. are all expressions). Once you have that powerful feature it makes sense to write code in a certain way to make use of that, and it ends up being clearer a lot of the time.