Hacker News new | past | comments | ask | show | jobs | submit login

Interesting. I've been trying to decide which language to learn next. Between Scala, elixir, and haskell at the moment. Was leaning Scala, but all the praise here is starting to convince me to go elixir. What problems did you run into with Scala?



In Scala, there are many ways to write a function. I wish I can share some code snippets, but, I'll just summarize for the sake of simplicity:

1) Functions have different forms and even nomenclature based on how many parameters they accept, how they are represented, etc.

2) Scala still has OO, which means it needs to carry a lot of baggage. The breadth of Scala's nomenclature combined with OO will take you a long way to learn the language.

3) Scala still runs on JVM which means you need to learn some of the JVM concepts if you'll be using it in prod. If you're from a Rails background, this is completely a new arena, because this is usually the Java guys' arena.

4) I wanted to be able to simply open up the source code and be able to understand what's happening. This was possible in Ruby/Rails, and ultra easy to do in Phoenix/Elixir, but painful in Play/Scala. IF you open up the source code of a Play! framework project, there's code so succinct that you would need to be strong with the language's understanding to get the full picture. Case class, implicit, etc., just to cite a few. In Elixir/Phoenix, it's just modules and it's just simple, yet elegant.

5) That being said, it's still good to learn Scala because there are tons of libraries out there with special use cases which you can use Scala for - It's still a good strongly typed language to build a robust project on. IF I remember correctly, David Pollak mentioned in his book that he'd written an app in Scala that ran for years without any problems.

As for Haskell, I read this somewhere - "Haskell is nice and all, but it's no Erlang." Since Erlang also has a bit of a learning curve, the next best alternative is Elixir.

P.S, - languages should be chosen based on one's own philosophy and in this case, Elixir strongly resonates with my own philosophy and all this is just my own opinion on why I chose it :)

Cheers.


> I wanted to be able to simply open up the source code and be able to understand what's happening. This was possible in Ruby/Rails, and ultra easy to do in Phoenix/Elixir

While it is possible to look at source code in Ruby/Rails, in practice for me (even after a few years of production ruby experience) it was extremely painful to look at any number of libraries due to the amount of redirection and implicit state, and monkey patching. But Elixir has (almost always) been VERY easy to follow, sometimes the code is just so simple.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: