What’s This All About?
It’s about concurrency. It’s about distribution. It’s about fault tolerance. It’s about functional programming. It’s about programming a distributed concurrent system without locks and mutexes but using only pure message passing. It’s about speeding up your programs on multicore CPUs. It’s about writing distributed applications that allow people to interact with each other. It’s about design methods and behaviors for writing fault-tolerant and distributed systes. It’s about modeling concurrency and mapping those models onto computer programs, a process called concurrency-oriented programming.
Reasons to learn Erlang:
- You want to write programs that run faster when you run them on a multicore computer.
- You want to write fault-tolerant applications that can be modified without taking them out of service.
- You’ve heard about “functional programming” and you’re wondering whether the techniques really work.
Functional programming forbids code with side effects. Side effects and concurrency don’t mix. You can have sequential code with side effects, or you can have code and concurrency that is free fro side effects. You have to choose. There is no middle way.
Erlang is a language where concurrency belongs to the programing language and not the operating system. Erlang makes parallel programming easy by modeling the world as sets of parallel processes that can interact only by exchanging messages. In the Erlang world, there are parallel processes but no locks, no synchronized methods, and no possibility of shared memory corruption, since there is no shared memory.