ErLang

ThoughtStorms Wiki

Context : ProgrammingLanguages, OnConcurrency

Actor-based, MessagePassing, FunctionalProgramming language initially for telecommunications applications.

https://www.erlang.org/

Invented by JoeArmstrong

Famously used in WhatsApp

See ErlangAndSmalltalk for some interesting comparisons. In some ways AlanKay thinks Erlang is closer to his original ideas for Smalltalk than more mainstream ObjectOriented languages.

Quora Answer : Which programming language is best for developing a website that can scale to over 100 million users?

Apr 5, 2019

Depends what you want to do with them.

And, as Tim Mensch says, depends on if you want "concurrent" (ie. at the same time), and how much "at the same time")

Erlang scales beautifully to a lot of connections.

I'm guessing it could handle that quantity.

But even Erlang won't be able to do a lot of processing on behalf of those users unless you throw sufficient hardware at it.

Quora Answer : Why aren't programming languages like Elixir and Erlang not widely adopted?

Dec 21, 2017

Erlang has been around for a long time. But it's a niche language.

It's very good for what it's good at and was created for, but perhaps not so optimal for most other uses.

Now everyone wants to write microservices and applications that deal with huge firehoses of data flow, Erlang is actually the perfect language / environment. (For example, every time we move closer to a "serverless" or "functions on demand" like Amazon Lambda model, we're actually moving closer to Erlang's environment.)

But Erlang was never designed to make GUI-based desktop apps. or even to integrate with a relational database doing CRUD style applications. (It does the latter OK, but not noticeably easier than PHP or Rails etc.)

Elixir is a great idea : put something that looks much more like Ruby on top of the Erlang VM and model. I expect it to do well, in the sense that many people familiar with Ruby will be attracted by it and find the syntax comfortable.

But it's very new, perhaps not battle-tested yet.

Quora Answer : Why does Erlang have far more real world usage than Haskell in terms of IO centric services? Is it the pragmatic approach to side-effects? Is the IO Monad in Haskell introducing a lot of overhead?

Mar 26, 2014

Erlang is that rare thing : a programming language invented by industry for its own internal use.

Most languages come from academia or research projects and are based on what the researchers think will be a good idea. Or are intended as teaching languages to try to inculcate the right values into students.

Languages that come from industry OTOH have tended to come from platform vendors for whom the language is either a cost of doing business. ("Oh God! I suppose we need a Fortran on our OS for all those engineers") Or is designed to promote the platform. ("Look VisualBasic makes writing Windows programs easy").

In contrast, Erlang's motivation is seen as purely practical. It has been dog-fooded by Ericson since its invention. And its sales pitch is great : "Sure it's weird. Sure it looks like Prolog! (WTF????) But here's a bunch of rock-solid switches that it helped us make." That's something that immediately attracts attention and commands respect.

Quora Answer : What are the weaknesses of the Erlang programming language?

Sep 24, 2018

My understanding, one of the biggest drawbacks in Erlang is that data is passed between processes by value.

That's a great great advantage in general. It's why Erlang is so robust and reliable. No mutable data.

And it's fine for small packets of data.

But it's lousy if you want to make a program that manipulates large in memory data-objects. You wouldn't, for example, want to use Erlang for a photo manipulation program that has to do things to 10 megapixel images. The only way to communicate those between processes is to deep copy the whole bitmap every time you pass it from one process to another.

Erlang is a great language. It's very powerful. It's fairly elegant. It's really really good for the things it's been optimised for. But it's not a "generalist" language. There are things it's just not good for.

Quora Answer : What programming language was used to make WhatsApp?

Nov 3, 2017

Erlang : Inside Erlang, The Rare Programming Language Behind WhatsApp's Success

Quora Answer : What are the novel ideas and profound insights in the design of the Erlang programming language?

Nov 11, 2013

From the History of Erlang page :

1985 - 86

Experiments with Lisp,Prolog, Parlog etc. Conclusion: The language must contain primitives for concurrency and error recovery, and the execution model must not have back-tracking. (Rules out Lisp and Prolog.) It must also have a granularity of concurrency such that one asyncronous telephony process is represented by one process in the language. (Rules out Parlog.) We must therefore develop our own language with the desirable features of Lisp, Prolog and Parlog, but with concurrency and error recovery built into the language.

That seems a good encapsulation of Erlang's unique selling point when it was conceived.

So Erlang was one of the languages designed to have concurrency and parallelism baked in. While drawing a lot on both PrologLanguage (pattern matching and syntax) and Lisp (functional programming).

It standardized (though didn't invent) the Actor model.