I have been playing with F# a fair bit and I am totally in love with the language. I wish it was a jvm language given that is what I ply my trade on (and no scala is not as elegant imo)
F# is indeed very interesting! For the JVM, one alternative (based on Haskell 2010, so it has philosophical similarities to F#) is Frege (https://github.com/Frege/frege). Frege is probably even less mainstream than F#, though. I don't use it because I'd rather code in Haskell using GHC.
While it's not an ML-style language, I've found that I enjoy Clojure the most when it comes to JVM alternatives. The lack of F#-style pattern matching makes a few things feel less elegant, but the general structure of my code is extremely similar.
There is core.match[1], and between the restructuring bind, multimethods, and the ability to create polymorphic functions like hello in this example[2], you can replicate a lot of common FP idioms reasonably well. It's not pretty, but Clojure generally isn't.
The trouble with Scala is that developer A writes elegant mostly-functional code while developer B uses global state modified in nested while-loops with everything as type Any. I think more of a bondage language approach would be better.
Agreed this is a problem. For example, I had to educate my boss about Option vs null, and I'm still not sure he gets it (he's an old school C-and-then-Java programmer).
On the other hand, it's possible to "not get it" and write messy code in even the most bondage-oriented languages.
the_af|11 years ago
edgyswingset|11 years ago
jarcane|11 years ago
[1] https://github.com/clojure/core.match [2] https://github.com/lazerwalker/clojurescript-koans/blob/mast...
tormeh|11 years ago
the_af|11 years ago
On the other hand, it's possible to "not get it" and write messy code in even the most bondage-oriented languages.
wtetzner|11 years ago