6 ms·
I'm currently learning F#, and liked everything so far, in particular that you can learn both functional style as well as interaction with existing .net apis, w
by elcapitan 10y ago
I'm currently learning F#, and liked everything so far, in particular that you can learn both functional style as well as interaction with existing .net apis, which allows you to build typical use-cases faster (as you would know them from imperative/oo languages, like building a small crawler). I wish there was a good ML-style language for the JVM.
VS Code has good integration, check out the Ionide plugin.
For a language introduction, this wikibook is quite ok: https://en.wikibooks.org/wiki/F_Sharp_Programming https://en.wikibooks.org/wiki/F_Sharp_Programming
- fnl 10y ago> I wish there was a good ML-style language for the JVM. Scala?
- elcapitan 10y agoML?
- fnl 10y agohttps://en.wikipedia.org/wiki/Scala_(programming_language) https://en.wikipedia.org/wiki/Scala_(programming_language) (first paragraphs and "influenced by") https://www.quora.com/What-are-the-influences-of-the-ML-language-on-Scala https://www.quora.com/What-are-the-influences-of-the-ML-lang... ...
- elcapitan 10y agoOk, yeah, influenced. Javascript could also be called a LISP with C-Syntax, but that wouldn't make it a LISP. But I get what you mean.
- fnl 10y agoYou should compare the actual syntax and constructs. I agree that JS and LISP certainly are as far apart as anything else, and Python is as "functional" as any other imperative language. But Scala indeed is very similar to (1) OCaml and then (2) ML, and last, (3) Haskell in terms of type inference, syntax, and many other FP concepts [1]. [1] http://www.appservgrid.com/hyper/hyp/ml http://www.appservgrid.com/hyper/hyp/ml
- elcapitan 10y agoFair enough, thanks for the pointer :)
- drivebyops 10y agoScala is Hindley-Milner?
- fnl 10y agohttp://www.scala-lang.org/old/node/4654 http://www.scala-lang.org/old/node/4654 (Short answer: No, because it has [to support] subtypes.)
- hugofirth 10y agoThis! Don't be fooled by the prevalence of Haskell-like libraries and patterns in the Scala community (or a vocal subset). Those are absolutely useful but you're free to use them or not, and if you want to just write ML style functional code then Scala is great for that too. There is actually a really interesting (to me) discussion going on about where Scala sits on the Intersection of Java,ML & Haskell going on in the r/Scala subreddit at the moment: https://www.reddit.com/r/scala/comments/5sv1w5/the_divergence_of_strongly_typed_programming/ https://www.reddit.com/r/scala/comments/5sv1w5/the_divergenc...
- JimmyM 10y agoSo, I just started learning Haskell and I learned a bit of Standard ML in the past. I was/am expecting Haskell to be broadly similar to ML - what's the main way the two languages differ? edit: never mind, from the reddit discussion you linked: > while these languages are undoubtedly strongly typed, they are not referentially transparent by default, and actually embrace some levels of imperative programming. Good read, thanks!
- dualogy 10y ago> I wish there was a good ML-style language for the JVM. github.com/Frege and eta-lang.org may be tried out
- elcapitan 10y agoI had looked at Frege, but it doesn't seem to have the same traction as other functional languages. Counting on github returns about 10k for each F# and Ocaml, about 60k for Haskell, and 100k for Scala, but about < 200 for Frege.
- dualogy 10y agoYeah compared to .NET there's nothing ML-ish in the F# ballpark (in terms of push/community/basic corporate support = "traction") for the JVM afaik.
- premium-concern 10y agoTrue in the sense that Scala has a magnitude higher number of repos, commercial adoption, libraries, than F# (while being much closer to ML than F# in a few important was).
- dualogy 10y agoWhoops, my bad, the only faint idea about ML I do have is as the "MotherLode" from what I know of modern-day F# / Haskell --- never looked at Scala so far That then should be the actual answer to OP's question