[whatwg] Fixing undo on the Web - UndoManager and Transaction
ayg at aryeh.name
Tue Sep 13 13:43:33 PDT 2011
On Mon, Sep 12, 2011 at 8:19 PM, Jonas Sicking <jonas at sicking.cc> wrote:
> Could you please supply an example where the apply/reapply split leads
> to cleaner or otherwise better code than using a boolean argument?
Boolean arguments are evil and should be avoided wherever possible.
It's impossible to figure out from the call signature what they do.
Instead, have an argument that accepts a string argument consisting of
space-separated tokens, or something like that. Even named constants
are better than boolean arguments.
More information about the whatwg