How Erlang is better than other language in doing concurrency?

961 views Asked by At

I don't understand why erlang itself is great with concurrency

Is there anyway other language such as C# could be as great as erlang if we do some trick?

Or it is the very specific language feature of erlang that most language don't have?

Could we write C to be like erlang?

1

There are 1 answers

4
byaruhaf On

One Major property of Erlang is that it was built from the ground up to be a concurrent language. Erlang supports hundreds of thousands of lightweight processes in a single virtual machine. Because Erlang's processes are completely independent of OS processes they are very lightweight, with low overhead per-process. Thus when using Erlang for concurrent oriented programming you get alot of advantages out of the box.

  • Fast process creation/destruction
  • Ability to support millions of concurrent processes with largely unchanged characteristics.
  • Fast asynchronous message passing.
  • Copying message-passing semantics (share-nothing concurrency).
  • Process monitoring.
  • Selective message reception.

This Erlang style concurrency is not impossible to do in C, but it would be hard to do it. Read this blog for more information on Erlang style concurrency