Future Investments: Erlang vs. Scala

as concurrent programming is becoming increasingly important, I was wondering what you think of Erlang vs Scala in this regard. It seems to me that Scala has a large user base and a potentially brighter future than Erlang. Moreover, Scala is a kind of java.

I know that these issues are always a bit subjective, but what would be better future investments: Erlang or Scala. Or even a different language?

+61
scala concurrency erlang
Jul 25 2018-11-17T00:
source share
3 answers

Erlang is designed for parallel fault tolerant communications systems. You can easily write servers that handle a large number of network connections and (thanks to a single garbage collector per Erlang process), servers can maintain soft characteristics in real time (i.e. the whole server does not stop until the end of the GC). You can also build Erlang code, distribute it across multiple nodes, etc. Therefore (possibly) the most scalable XMPP server (ejabberd) is written in Erlang. Yaws (web server) is another example where Erlang excels: http://www.sics.se/~joe/apachevsyaws.html . Riak / Couch are examples of building a NoSQL database using Erlang. These are problems in which Erlang is an excellent choice.

But Erlang VM is not as fast as the JVM in terms of raw computing, so as soon as you need to do something computationally intensive (like financial modeling), the JVM will become your preferred platform. Moreover, the Erlang concurrency model (actors) is baked in this language. If this does not match the problem you are trying to solve, then you will not be satisfied with Erlang.

Scala is a more "general" language in the sense that concurrency, horizontal scalability, or fault tolerance are not part of the language. It is solved at the library level (therefore, Scala has at least 3 actor implementations). It’s good that you can choose a concurrency model that fits your domain. For example, if you need transactional memory software (STM), just select Akka and you should go ( http://akka.io/ ).

Plus there is a whole argument that with Scala you can use your "investment in JVM" and many JVM libraries.

You did not give any information about what software you want to write in any of these languages, so it is difficult for you to give a definitive answer. Having said that, with all of the above, Scala can be a β€œsafer” capital than Erlang (don't beat Erlang / OTP at all, it's a great language / platform).

BTW. If one concurrency Clojure machine ( http://clojure.org/ ) is important to you, you should not overlook (also the JVM language).

UPDATE1: If you like what Erlang offers but not its syntax, check elixir-lang.org

+81
Jul 25 2018-11-21T00:
source share

It doesn't matter. Just pick one and stick with it for a while. Learn some things, do cool things, and keep going with that language or move on to another.

As for learning parallel programming, everything will be fine. The key point here is that you will learn something new, and if there is no opening of the vacancy that you are trying to hire, Erlang is used for this, it really does not matter. Plus, even if this discovery required Erlang, you would still have a good chance if you knew Scala really well.

Think, all the time spent on choosing a new language, it would be better to spend if you just chose it and already started to learn it.

+33
Jul 25 '11 at 17:50
source share

Both languages, at the core, are not so difficult to learn as well as learn the concurrency functions that they provide. In fact, Scala actors are influenced by Erlang actors. I would go to both of them, take your time looking at their design, do some tests in concurrency problems, etc.

If you know Java, Scala will be more natural, since Erlang is more like a prolog. If, on the contrary, you are more oriented towards the mathematical or logical type of languages, start with Erlang.

+5
Jul 25 2018-11-17T00:
source share



All Articles