W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2011

[whatwg] Fixing undo on the Web - UndoManager and Transaction

From: Aryeh Gregor <ayg@aryeh.name>
Date: Tue, 13 Sep 2011 16:43:33 -0400
Message-ID: <CAKA+AxkzMRQGnabCn2tiKK4Vv0iVOTaqxV8RttxajC-u11vyfw@mail.gmail.com>
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.
Received on Tuesday, 13 September 2011 13:43:33 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:36 UTC