News for hackers. Stuff that matters.
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.)