Earlier quoted context omitted.
Functions have no internal state. Early languages used global variables to share state across functions without explicit message passing (everything was a singleton). This created worlds of pain. The alternative was passing state with each function call. This also got painful as people often passed data down through functions. OOP lets chunks of functions share state and hide that state from the wider application. Mo…
> Functions have no internal state. But closures do. And thus, why closures are a poor man's objects, and objects are a poor man's closures. As an example, Java closures are really anonymous objects with the closed state as instance variables. > More importantly you could have multiple instances of that shard state without explicit management, saving a lot of complexity and effort. Technically that's what classes giv…
No, that's what objects give you. Classes are merely one means of creating objects (others exist), but the benefits come from the objects, not their means of construction.