Re:A statically typed scripting language that transpiles to ...
by xmcqdpt2 on Sunday March 27, 2022 @07:48AM
(#30819523)
"Standard" Scala (i.e. without the fancy monadic libraries like cats or zio) and Rust are both mixed paradigm languages with good support for many FP constructs.
In practice you can write imperative code using either of them but the focus on immutable data structures, and (in Rust more than Scala) functional error handling means that many manipulations are easier to do with FP constructs, so they appear quite naturally (Option, Result/Try, iterator maps etc.)
As a bonus IME they are very similar in many respects so experience in one translates well to the other.
In practice you can write imperative code using either of them but the focus on immutable data structures, and (in Rust more than Scala) functional error handling means that many manipulations are easier to do with FP constructs, so they appear quite naturally (Option, Result/Try, iterator maps etc.)
As a bonus IME they are very similar in many respects so experience in one translates well to the other.