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: Fri, 27 Jan 2012 17:46:08 -0600
Message-ID: <CABirCh8ZbtTv-2hhRHrjVRBO4vneAnn7=PvM+Pxwx+1xrYabFA@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Mike Taylor <miket@opera.com>, Arun Ranganathan <aranganathan@mozilla.com>, "Web Applications Working Group WG (public-webapps@w3.org)" <public-webapps@w3.org>
On Fri, Jan 27, 2012 at 11:04 AM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> ...yes?  It can be.  I made the general argument above - if an
> optional argument has *no relation* to expected future optional
> arguments, then it shouldn't be an optional argument at all, it should
> be a keyword argument instead (implemented in JS via a dictionary
> object arg).  Otherwise authors will end up being forced to specify
> the "optional" argument with a dummy value just because they actually
> want to specify a later optional argument.
> You should only create multiple optional arguments when specifying a
> later one *implies* that the earlier ones should be specified as well.
>  You shouldn't create a *single* optional argument if you expect that
> it won't have such a relationship with things made in the future.

I never argued against any of this.  My point, again, is against this:

> As I argued in <
> we should absolutely *not* be adding more boolean arguments to the
> platform.  They should be exposed as boolean properties in an
> dictionary.  Naked bools are impossible to decipher without memorizing
> the call signature of every function.

Booleans are no more "impossible to decipher" than numeric or nullable
arguments; there's nothing especially opaque or mysterious about them.  We
definitely should not make *every* boolean parameter a dictionary parameter
just because it's a boolean, which is what the above claims.

Glenn Maynard
Received on Friday, 27 January 2012 23:46:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:31 UTC