4 ms·
Thanks for that, interesting comparison. Extensive usage of var in the examples, that's not suggested best practice in Scala, val is king, but I guess for one-
by virtualwhys 12y ago
Thanks for that, interesting comparison.
Extensive usage of var in the examples, that's not suggested best practice in Scala, val is king, but I guess for one-to-one comparison each language does indeed express mutability similarly.
`return` is implicit if expression is the last in a block, so none of the `return` statements on the Scala side are needed.
Pretty interesting grab bag of functionality, I'm seeing a lot of Scala, but then bits of Python, Groovy, and Kotlin (extension methods) as well.