Welcome to Questionaries, where you can ask questions and receive answers from other members of the community.

Let us know at info@questionaries.org

Yet another Haskell vs. Scala question

12 like 0 dislike
I've been using Haskell for several months, and I love it—it's gradually become my tool of choice for everything from one-off file renaming scripts to larger XML processing programs. I'm definitely still a beginner, but I'm starting to feel comfortable with the language and the basics of the theory behind it.

I'm a lowly graduate student in the humanities, so I'm not under a lot of institutional or administrative pressure to use specific tools for my work. It would be convenient for me in many ways, however, to switch to Scala (or Clojure). Most of the NLP and machine learning libraries that I work with on a daily basis (and that I've written in the past) are Java-based, and the primary project I'm working for uses a Java application server.

I've been mostly disappointed by my initial interactions with Scala. Many aspects of the syntax (partial application, for example) still feel clunky to me compared to Haskell, and I miss libraries like Parsec and HXT and QuickCheck.

I'm familiar with the advantages of the JVM platform, so practical questions like this one don't really help me. What I'm looking for is a motivational argument for moving to Scala. What does it do (that Haskell doesn't) that's really cool? What makes it fun or challenging or life-changing? Why should I get excited about writing it?

UPDATE: Many thanks to everyone for the responses. The consensus seems to be "try Clojure instead", which I think is a great idea.

I'd still love to hear from more passionate Scala advocates. I'll admit that first-class modules don't strike me as particularly tempting, but I am planning to read up on the new 2.8 collections library.
asked 2 years ago by pollard (41,990 points)

2 Answers

2 like 0 dislike
 
Best answer
Scala's killer feature (vs. Haskell) is Java interop. It interfaces seamlessly with Java and it's really natural to write alongside Java. Its goal was to bring functional programming to the Java platform (which has historically been dominated by, well, Java), not so much to push the boundaries of programming as a whole. If you like functional-style programming and you need to interface with Java, you'll have a much easier time in Scala than in Haskell.

Keep in mind that you don't need to be married to any one language. Use whatever is most appropriate for the situation. It might be Haskell. It might be Scala. It might be Ruby. They all have different strengths — and I don't mean that in the trite "Everybody's a unique snowflake" kind of way. Don't discount everything else just because you've found one thing you like.
answered 2 years ago by william (91,210 points)
4 like 0 dislike
I've found Clojure to be easier for natural language processing. I'm also in the humanities (Classical Languages).

Lisp dialects like Clojure have a long history in NLP, so you might be able to find some decent prior art, and it also has good Java interop.
answered 2 years ago by biswaskeran (70,430 points)

Related questions

9 like 0 dislike
3 answers
4 like 0 dislike
1 answer
13 like 0 dislike
1 answer
12 like 0 dislike
1 answer