4 ms·
I personally prefer Scala. It supports functional programming (combining it nicely with object oriented programming), immutability, tail recursion, lazy evalua
by tom_jones 12y ago
I personally prefer Scala.
It supports functional programming (combining it nicely with object oriented programming), immutability, tail recursion, lazy evaluation (you have to specify what will be evaluated lazily), collections with parallel processing support, actor based processing, pattern matching and of course a REPL.
But none of that is mandatory, for example when needed, you can also use mutable variables and collections.
It runs on the JVM, and you can mix Java code and libraries with Scala code and libraries. And the ecosystem of Java libraries is huge.
- warmfuzzykitten 12y agoYes, Scala certainly has all the latest programming language bells and whistles, but - leaving aside the many highly tuned libraries and 60 years of compiler experience on every imaginable hardware configuration - it doesn't have the single attribute that keeps Fortran on top: runs numeric codes fast.
- frowaway001 12y agoA trait shared with the other languages mentioned here. It will be hard to beat Fortran, although Scala might be closer than the alternatives.
- tormeh 12y agoIt would be fun to see what Scala's performance is like with long-running simulations. Should be ideal for hotspot optimization. Isn't Java just as often used for HPC as C?