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

Re: [File API] Draft for Review

From: Ojan Vafai <ojan@chromium.org>
Date: Thu, 26 Jan 2012 16:54:04 -0800
Message-ID: <CANMdWTv8sijHhB2D1m33YFACCQ_pw-eakSuLoB8QNYrPn5bVhQ@mail.gmail.com>
To: Glenn Maynard <glenn@zewt.org>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Arun Ranganathan <aranganathan@mozilla.com>, "Web Applications Working Group WG (public-webapps@w3.org)" <public-webapps@w3.org>
On Thu, Jan 26, 2012 at 4:42 PM, Glenn Maynard <glenn@zewt.org> wrote:

> 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.

Depends on the argument type. For example, in document.createElement('div')
it's pretty obvious that the string is the tagname. Whereas in
node.cloneNode(true) it's not clear without looking at the signature of
cloneNode whether true means deep clone or shallow clone.
node.cloneNode({deep:true}) or node.cloneNode('deep') are clear without
looking up the signature.

That said, I sympathize that the overhead of creating an object or needing
to do a string compare just for a boolean is kind of sucky.
Received on Friday, 27 January 2012 00:54:51 UTC

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