Re:Why learning Haskell makes you a better programmer
by hesselink on Monday December 24, 2012 @02:40PM
(#4963856)
The C++ version can (and often will) use mutable fields behind the scenes. The Haskell version can't. So it is thread safe by default, while the C++ version might break some internal invariant if used from multiple threads. So even on such simple functions, purity can give some advantage.
[ Parent
| on HN ]
There are no comments on this comment yet.