Hacker News new | ask | show | jobs
by neilk 5689 days ago
Scala.

I want the power of types and functional programming and Actor concurrency, but am leery of doing anything practical with languages like Erlang or Haskell.

Plus, Scala runs on the JVM and is thus compatible with all of Java's libraries. The day I have to read a UTF8 string backwards I want to use some standard library, not get creative with a linked list of ints.

Plus plus, the Lift framework looks pretty great.

3 comments

> doing anything practical with languages like Erlang or Haskell

Why do learn it for a specific reason? Why not learn a language to expand your mind? Scala is awesome, but Haskell will help you make use of some of its more powerful features. By all means, learn both.

Erlang is interesting and is quite practical too (albeit Scala tends to be practical in more kinds of problems: there many times where you want an easier way to deal state shared between processes than ETS/Amnesia). Knowing Erlang you can make a better decision when to use Scala's own actor facilities and when not to.

I don't have an opinion about erlang or scala, but I agree with the poster that it is important to do something practical with a language. How will you learn the concepts that a language tries to teach you without actually building something non-trivial in it?
Oh you can certainly build non-trivial things in the language. It's just you may not be able to use it for a work project (for different reasons). This is what I meant by practical: software that you build at work and that operations will deploy or sales will sell.

There's tons of practical applications built in both Haskell and Erlang: erlang has rabbit mq (I have some criticisms of it, but they're not related to the language it's built in), Haskell has XMonad (the window manager I use on a daily basis). Both are very practical.

I've already dabbled a bit in Erlang and Haskell. I think they are great languages.

Anyway, this was just an expression of interest that Scala might be a better all-around language for getting things done. I have no Scala experience. I could totally be wrong about this.

I should note that I have a particular project in mind that has a web-facing component and multiple nodes on the backend. It's not 100% clear to me that Haskell is the right tool for that job. Erlang could definitely do that sort of thing. But Scala might be more convenient than either.

Erlang comes from industry and design has been driven by use... that's pretty practical.

Your point about the JVM is solid, but it would be a mistake to dismiss a language wholesale with a cheap dig because you hear that "string handling sucks". :)

Why are you leery of doing anything practical with Erlang and Haskell? #haskell on freenode is filled with people doing practical things in Haskell and Ericsson has bet most of its infrastructure on Erlang...
Scala may be a way to get many of the benefits of Erlang and Haskell while also using a platform that is very successful and well-understood. And if I need to calculate what day of the week it is in 10 days in German, I know some library will exist for this. Scala could be snake oil, but it looks interesting.

I have to come to terms with my own ignorance. I'm not saying there isn't a good date library in Haskell. I'm saying I don't know if there is one, and as long as I'm learning a new language, I might as well choose something where I know at least some of those issues are definitely solved. This may cause some partisans to rage, but when choosing a language for a project, personal comfort is really the #1 issue.