SoFunction
Updated on 2025-04-11

The first impression of Erlang programming language

The world is parallel, and the Erlang program reflects the way we think and communicate, people as individuals communicate by sending messages, and if someone dies, others will notice it.
The module class in Erlang is equivalent to the class in OOPL, and the process is equivalent to the object or class instance in OOPL.
Concurrent programming can be used to improve performance, create scalable and fault-tolerant systems, and write clear and understandable programs to control real-world applications.
 
A concurrent program is a program written in a concurrent programming language, and the concurrent programming language has a language structure for writing concurrent programs. Erlang's concurrent programs are composed of multiple sets of sequential processes that communicate with each other. One process is a lightweight virtual machine that can execute a single Erlang function and can only communicate with other processes by sending and receiving messages. In other words, concurrency is provided by the Erlang virtual machine, and the concurrent control granularity of the operating system is much smaller.
In Erlang:
1) The creation and destruction process is very fast
2) It is very fast to send messages between processes
3) Processes behave the same way on all operating systems
4) Can have a large number of processes
5) There is no shared memory between processes and is completely independent
6) The only way to communicate is message delivery, and each process has a mailbox created synchronously with the process.
 
Dynamic code loading is one of Erlang features. Function calls always the latest version of the function in the latest module, even if the module is recompiled when the code is run in the module.