4 ms·
And that's why the 'war' has just moved to the JVM: Closure is a Lisp, Scala steals a whole lot of things for Haskell, trying to make it actually practical. I
by hibikir 13y ago
And that's why the 'war' has just moved to the JVM: Closure is a Lisp, Scala steals a whole lot of things for Haskell, trying to make it actually practical.
I think Haskell's ultimate role is a bit like Ruby's: It can't really win, but it's destined to be influential. That's a much harder road for Lisp, as its greatest strengths are also its greatest flaws.
- thirsteh 13y ago> Scala steals a whole lot of things for Haskell, trying to make it actually practical. LINQ is "practical Haskell," so is most of Rust (if "practical" means approachable to imperative programmers.) Besides being on the JVM (which is a big plus), Scala hardly makes anything more practical than it is in Haskell. In fact, Scala programmers tend to migrate to Haskell (and ML languages) rather than the other way around.
- platz 13y agoIf by LINQ you mean the map/filter/fold crew, I think this may be selling Haskell a little short. You could say the same about python. At least F#'s computation expressions give you the full power to create your own monads with it's "computation expressions", and in LINQ things are more statically locked down.
- thirsteh 13y agoRight -- I wasn't sure whether F# would be considered "practical" in this case.
- platz 13y agoI guess F# isn't practical if you're building a WPF application (I agree the tooling is lacking). Otherwise it seems like it can do everything C# does (including mutation, classes, interfaces, properties), only with a slightly unfamiliar (at first) syntax.
- cordite 13y agoDoesn't scala suffer from the JVM constraints, like no tail call recursion, everything is an object, such that the compile times become enormous to work around them? Haskell is indeed influencing, but it is not remaining stagnant.
- jonesetc 13y agoThe way I understand it, is that Scala does support tail-call recursion by way of compiling to a loop. Compilation was definitely a pain when I experimented with Sit.
- chc 13y agoScala supports simple recursive tail-call optimization, but is less elegant in handling mutual recursion (due to JVM constraints). Clojure is probably the one you're thinking of that doesn't support tail-call elimination at all. Rich Hickey thought that if you couldn't do it cleanly in all cases (like mutual recursion), you may as well just come up with something else. So instead of optimizing recursive calls, Clojure has the recur function.
- cordite 13y agoI recall that scala uses "trampolines" by compiling to what is more like a state machine.
- judk 13y agoI thought Actors does that, but not Scala in general.(?)
- cordite 13y agoRúnar Bjarnason talked about it in his presentation "FP Programming is Terrible" [0] (he makes up for that title in the end) I asked him about it on twitter since it reminded me of thunks, he said " a trampoline executes a sequence of thunks, yeah" [1] [0]: https://www.youtube.com/watch?v=hzf3hTUKk8U https://www.youtube.com/watch?v=hzf3hTUKk8U [1]: https://twitter.com/runarorama/status/449070763421618176 https://twitter.com/runarorama/status/449070763421618176
- aerique 13y agoI'm not sure whether I am parsing you correctly, but did you just call Lisp not influential?