Hacker News new | ask | show | jobs
by baddox 2719 days ago
> I too am a bit skeptical about hooks making what looks like pure functions act like stateful ones.

What’s wrong with that? Any conceivable application needs to actually have state that changes over time. That’s true of all software written in a purely functional style.

1 comments

That’s true of all software written in a purely functional style.

By definition, any software that is purely functional does not have explicit mutable state. In practice, it is often useful to have parts of a system written in a pure functional style but other parts that do use mutable state, either explicitly or via some mechanism that simulates it in a functional context.