News for hackers. Stuff that matters.
Re:Getting Started with Functional Programming in F# by elcapitan on Friday February 10, 2017 @03:32AM (#13614024)
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

Re:Getting Started with Functional Programming in F# by dualogy on Friday February 10, 2017 @06:23AM (#13614630)
> I wish there was a good ML-style language for the JVM.

github.com/Frege and eta-lang.org may be tried out

Re:Getting Started with Functional Programming in F# by elcapitan on Friday February 10, 2017 @07:34AM (#13614927)
I 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.

Re:Getting Started with Functional Programming in F# by dualogy on Friday February 10, 2017 @08:15AM (#13615132)
Yeah 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.
Re:Getting Started with Functional Programming in F# by premium-concern on Friday February 10, 2017 @10:31AM (#13616018)
True 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).
Re:Getting Started with Functional Programming in F# by dualogy on Friday February 10, 2017 @11:40AM (#13616679)
Whoops, 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

Re:Getting Started with Functional Programming in F# by fnl on Friday February 10, 2017 @04:19AM (#13614225)
> I wish there was a good ML-style language for the JVM.

Scala?

Re:Getting Started with Functional Programming in F# by hugofirth on Friday February 10, 2017 @06:12AM (#13614578)
This! 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_divergenc...

Re:Getting Started with Functional Programming in F# by JimmyM on Friday February 10, 2017 @06:21AM (#13614614)
So, 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!

Re:Getting Started with Functional Programming in F# by elcapitan on Friday February 10, 2017 @04:35AM (#13614278)
ML?
Re:Getting Started with Functional Programming in F# by fnl on Friday February 10, 2017 @04:38AM (#13614296)
Re:Getting Started with Functional Programming in F# by elcapitan on Friday February 10, 2017 @04:51AM (#13614342)
Ok, 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.
Re:Getting Started with Functional Programming in F# by fnl on Friday February 10, 2017 @06:22AM (#13614622)
You 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

Re:Getting Started with Functional Programming in F# by elcapitan on Friday February 10, 2017 @07:23AM (#13614874)
Fair enough, thanks for the pointer :)
Re:Getting Started with Functional Programming in F# by drivebyops on Friday February 10, 2017 @07:30AM (#13614907)
Scala is Hindley-Milner?
Re:Getting Started with Functional Programming in F# by fnl on Friday February 10, 2017 @07:36AM (#13614935)
http://www.scala-lang.org/old/node/4654

(Short answer: No, because it has [to support] subtypes.)