Re:Reasons to use Phoenix instead of Rails
by ramchip on Sunday November 26, 2017 @06:59PM
(#15783815)
> If you force everything to always be passed by value and returned by value (never by reference) it's clear that the costs of constantly cloning all these objects would quickly add up.
That’s not what happens. See: http://erlang.org/pipermail/erlang-questions/2013-March/0727...
“Pass by value does NOT imply copying and never has; copying is only required for mutable data structures, and Erlang hasn't any.”
The problem with pure functional programming is that it prevents the developer from writing well optimized code.
State change side effects might be dangerous, but they're also a really good way to boost performance and sometimes they're totally worth it.