top | item 34971838

(no title)

ergeysay | 3 years ago

Not to mention that pure FP completely handwaves away implicit global state such as heap.

discuss

order

kilgnad|3 years ago

That's the point. This hand waving allows the user to build more complex systems.

The cost is efficiency but make no mistake not thinking about the heap allows people to build much more complex programs. It's a trade off between complexity and efficiency.

cubefox|3 years ago

Then could it reversely be argued that not worrying about the stack (tail recursion) allows people to build more complex programs? Probably depends on which is more worrisome on average, heap or stack.

akimball|3 years ago

Au contraire. It is a tradeoff between application programmer effort and compiler writer effort. Amortization infers it is better to have an extremely advanced IR optimizer.