2 ms·
> When you need undo and redo, knowing about command pattern made it easy. This is an example of a pattern that's only needed in C++-like languages. In a langu
by astrange 8y ago
> When you need undo and redo, knowing about command pattern made it easy.
This is an example of a pattern that's only needed in C++-like languages. In a language which supports messages (first-class method calls), undo stacks come naturally.
Note C++ has first-class function calls (function pointers), but not methods. NSInvocation does it all.