4 ms·
Maybe I'm confused by this particular example, but what languages would allow functions to store the value of the constructor like that without closures? The th
by ed25519FUUU 6y ago
Maybe I'm confused by this particular example, but what languages would allow functions to store the value of the constructor like that without closures? The thing I don't like about closures is that they can get messed up easily, and not even all OO languages support them.
I often think of functions as intentionally "stateless", NOT persisting any value. For that a class is used, if anything for safety.
- Izkata 6y ago> Maybe I'm confused by this particular example, but what languages would allow functions to store the value of the constructor like that without closures? It's javascript, where all functions are closures.