Using Scala, I&#x27;ve found the ability to pass around first class functions, and the default immutability of variables, enables me to make profound algorithmic optimizations I wouldn&#x27;t undertake in C++ et al. Then, if the computation generates too much garbage or goes slowly in a loop, I can then take shortcuts, like using mutable local variables, to make that section go faster.