4 ms·
Incidental? It's pretty well known that Scala was heavily influenced by Haskell. In particular, do notation (for comprehensions), pattern matching, lots of st
by OhHeyItsE 10y ago
Incidental? It's pretty well known that Scala was heavily influenced by Haskell. In particular, do notation (for comprehensions), pattern matching, lots of standard lib classes (ex Maybe (Option)), many of the methods in the collections library (map, fold, take, etc)
Anyway, I wasn't trying to disparage either of them (or this project). Just poking fun at the seemingly common "I want to use Haskell but I'm forced to deploy on the JVM" use case for Scala.
- whateveracct 10y agoNot to mention that you can get similar power to typeclasses in the language.
- saosebastiao 10y ago> It's pretty well known that Scala was heavily influenced by Haskell. Except that Martin Odersky himself has explicitly said that the primary influences were SML/OCaml and Java. > In particular, do notation (for comprehensions), I'll give you that one > pattern matching Which pre-date Haskell by nearly 2 decades in ML > lots of standard lib classes (ex Maybe (Option)), Also pre-date Haskell by nearly 2 decades, in addition to be named exactly the same as ML. > many of the methods in the collections library (map, fold, take, etc) Which pre-date Haskell by almost 4 decades with origins in LISP. > Just poking fun at the seemingly common "I want to use Haskell but I'm forced to deploy on the JVM" use case for Scala. Which is where the Scalaz folks come in. They want to piggy back off of something successful, as opposed to Frege, which is closer to what they actually want (avoiding success at all costs?). Who knows, maybe they actually like the strict-evaluation by default of Scala/ML, which is quite pragmatic, but definitely more in line with ML than Haskell.
- runT1ME 10y agoGiven the fact that OCaml seems to be adding type class support and has support for monadic comprehension (do/for), it seems like these ideas are getting adopted in multiple places. As a Scalaz committer and as a developer working at one of the largest scala shops (that makes heavy use of Scalaz), we don't try to write Haskell on the JVM. We do try to write pure, functional code as much as we can, and so what we end up with falls somewhere in the middle between an OCaml and Haskell.
- zem 10y agoreference for ocaml adding type class support?
- saosebastiao 10y ago> OCaml seems to be adding type class support Funnily enough, Scala's implicit-based type classes were the inspiration for the coming modular implicits type classes in OCaml (as opposed to the Haskell approach). It wouldn't be the first time that two languages have mutually inspired each other (The Rust and Swift teams have both acknowledged certain design decisions inspired by the counterpart).
- dragonwriter 10y ago> It's pretty well known that Scala was heavily influenced by Haskell. In particular, do notation (for comprehensions), Is it documented anywhere that this was inspired by Haskell? To me, Scala for comprehensions seem syntactically more like a generalization of Python comprehensions than Haskell's monadic do notation.
- codygman 10y agoPython's list comprehensions are a specialization of Haskell's list comprehensions[0]. I think Scala was influenced by Haskell's list comprehensions. 0: needs citation, though I remember reading something semi official about pythons comprehensions being influenced by Haskell. Maybe Python.org's page on Haskell.
- haldean 10y agoWell at the very least, Haskell's came first; they were part of Haskell 98 (finalized in 1999) and Python 2.0 (the first version with comprehensions) was released in 2000.
- AzzieElbab 10y agoIt's pretty well known that any post that starts with "It's pretty well known" is usually misleading