3 ms·
> I either reject or don't understand FP people when they claim FP doesn't have state). But that's not what state is, closures are just an easier way to define
by steinuil 10y ago
> I either reject or don't understand FP people when they claim FP doesn't have state).
But that's not what state is, closures are just an easier way to define lots of functions with similar parts.
EDIT: Sure, you can call "whether or not f() or x are defined at the moment of calling (y) => f(x, y);" a form of "state", but this is called late binding and is simply not a thing in purely functional languages like Haskell; the existence of f() and x is checked at compile time.