Hacker News new | ask | show | jobs
by leafboi 2123 days ago
In math everything is persistent/immutable anyway, so persistent data structures are a given when working with purely mathematical abstractions.

There is a memory issue because of this, but this problem isn't exclusive to FP languages. Many languages solve this with something called garbage collection.

1 comments

The very definition of pure FP (which is basically just programming founded on the principles of mathematics) rest foundationally on just a program that is immutable and has no side effects. Those are the only two requirements needed to do FP.

Immutability is therefore the axiomatic foundation of FP.