4 ms·
> > The Command pattern, in its most basic form, could also be considered as implementing 1st class functions by wrapping them into objects. > BTW, that's not
by Ace17 9y ago
> > The Command pattern, in its most basic form, could also be considered as implementing 1st class functions by wrapping them into objects.
> BTW, that's not really true; first class functions are not a replacement for commands.
Please note that you're extrapolating from my post: this isn't what I said.
We still need this pattern: there's no way you're going to implement "undo" using only first-class functions, and I'm well aware of that.
In some specific situations, though, we don't need it anymore, like when connecting a GUI "save" button to a "document.save" function.