Re:Opinions on functional programming and OCaml
by ModernMech on Saturday December 23, 2017 @07:47PM
(#15997236)
At the same time, when a language is 100% pure you gain some interesting abilities, like being able to rewind and replay the state of your program, or to optimize code by replacing function calls with computed values (memoization).
[ Parent
| on HN ]
Re:Opinions on functional programming and OCaml
by setzer22 on Sunday December 24, 2017 @04:46AM
(#15998834)
What stops a 90%-pure language to dectect pure functions and do the exact same optimizations?
I'm not saying that is decidable in all cases (can't come up with a meaningful counter-example either), but usually a 90% good enough solution is better than a 100% solution that makes you go out of your way to do very simple things (like print to stdout).