Hacker News new | ask | show | jobs
by lmm 1948 days ago
> It can be easy implemented in other lang/frameworks as well.

No it can't, it relies on the runtime being capable of fairly strong isolation between parts of the same project, something that is a famous strength of Erlang. If you try to do the same thing in a language like Python or Ruby with monkeypatching and surprise globals, you'll get into a lot of trouble.

1 comments

Weird, we do it with Python all the time. Just don't use globals/threadlocals everywhere and you will be good.
As long as you're not using any libraries/frameworks that use them.
I don't think we've ended up with libs that share state in a dangerous way, maybe we got lucky.
Modules are global singletons, class definitions are global singletons. Monkeypatching is less common in Python than Ruby but I'd still consider it a significant risk.