4 ms·
Because this is not a black and white matter. Lack of purity doesn't imply lack of local reasoning. A program that is 10% impure and 90% pure is not considered
by imtringued 9y ago
Because this is not a black and white matter. Lack of purity doesn't imply lack of local reasoning.
A program that is 10% impure and 90% pure is not considered pure yet is still 90% easier to understand than a 100% impure program.
- ModernMech 9y agoAt 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).
- setzer22 9y agoWhat 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).
- ernst_klim 9y agoI think the opposite. I feel that OOP had become such a mess exactly because of those ``compromises'' which were made in mainstream OOP languages (i.e. java, c++ etc). I expect the same from mainstream FP implementations. Such ``compromises'' just ruin the whole carefully elaborated framework of the paradigm introducing breaches, which would be filled with workarounds. And voila, meet new java.