3 ms·
I like to think there is a nice pun here, that functional programming is "timeless" in two simultaneous ways: (1) As mentioned in the article, values are immut
by curryhoward 6y ago
I like to think there is a nice pun here, that functional programming is "timeless" in two simultaneous ways:
(1) As mentioned in the article, values are immutable and side effects are reified so you do not have to reason about time. Instead, you can reason equationally, which unlocks some nice benefits related to refactoring, reasoning about correctness and concurrency, testing, reproducibility, etc.
(2) Functional programming is based on well-behaved mathematical foundations and so is more stable than the other programming paradigms. Object-oriented programming is a constantly moving target because it doesn't have a principled formal foundation (despite many attempts to establish one on an ex post facto basis), whereas functions are "timeless" in the sense that they're here to stay.
It's not without tradeoffs of course, but if you're willing to have an open mind about how computers should be programmed and forego some things that are so pervasive in traditional programming (e.g., unrestricted side effects), the payoff is huge.
- sidpatil 6y agoThis is known as combinatorial logic, contrasted with sequential logic which is "timeful".