Reputation: 53850
The feature widely advertised about Erlang is its ability to hot-swap code modules while the app is running and is shown as a unique killer-feature not available in other languages.
Here is a quote from Joe Armstrong's book:
Most servers execute a fixed program, and if you want to modify the behavior of the server, you have to stop the server and then restart it with the modified code.
Though, in context of web development, the majority of languages support so-called hot-swapping of the code even without calling it so. It's just updating code and publishing it on the web via git or a continuous integration solution.
I know Erlang has a lot of applications in domains other than web, so I am sure it makes sense in those cases.
But, does this feature have benefits in comparison to dynamic languages used for web, like Python, Ruby, JavaScript? What are the cases for web development where it outperforms popular web-oriented languages?
Upvotes: 0
Views: 590
Reputation: 14042
The hot code swaping in erlang offers more than the ability to upgrade the code (I won't make any comparison with python, ruby or javascript, I have a very limited knowledge of them):
{system, From, Req}
and then call sys:handle_system_msg/6
which in turn will call the code_change call_back.Upvotes: 3
Reputation: 347
This feature is not targeted at web development just as Erlang itself was not created with web development specifically in mind.
One possible area where this feature outperforms model used in general dynamic languages used for web is precise control over the way code is upgraded.
Upvotes: 0