W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2012

Re: [File API] Draft for Review

From: Glenn Maynard <glenn@zewt.org>
Date: Thu, 26 Jan 2012 18:42:28 -0600
Message-ID: <CABirCh8ZRNKtdt0WE1iaYcGh6D+UduDLEeB2nuLAbqshTaYK+w@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Arun Ranganathan <aranganathan@mozilla.com>, "Web Applications Working Group WG (public-webapps@w3.org)" <public-webapps@w3.org>
On Thu, Jan 26, 2012 at 6:25 PM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> As I argued in <
> http://lists.w3.org/Archives/Public/public-webapps/2011OctDec/1520.html>,
> we should absolutely *not* be adding more boolean arguments to the
> platform.  They should be exposed as boolean properties in an
> dictionary.

I don't find this compelling; you could make the same argument for any
optional argument.  When you only have a couple arguments, the additional
verbosity is a loss, particularly if the argument is used frequently.

When to use a dictionary is a judgement call, but it doesn't have anything
to do with the argument's type.

Naked bools are impossible to decipher without memorizing the call
> signature of every function.

Unless you're going to argue that *all* optional arguments should be moved
to dictionaries, this doesn't make sense--you always have to know the call
signature of functions you're calling.  That's no burden as long as you
don't have too many arguments (like init*Event).

Glenn Maynard
Received on Friday, 27 January 2012 00:43:01 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:38 UTC