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

Re: [File API] Draft for Review

From: Mike Taylor <miket@opera.com>
Date: Thu, 26 Jan 2012 22:45:45 -0600
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>
Message-ID: <op.v8p7ijhjnlz9g3@omg.local>
On Thu, 26 Jan 2012 21:23:46 -0600, Glenn Maynard <glenn@zewt.org> wrote:

> On Thu, Jan 26, 2012 at 7:01 PM, Tab Atkins Jr. <jackalmage@gmail.com>
>  wrote:
>
>> That's not necessary.  There are situations when optional arguments
>> make sense.  They should be avoided, though, when you expect that
>> *future* optional arguments will have nothing to do with the current
>> one, as otherwise you'll have to specify the "optional" argument every
>> time with some null value.
>>
>> Charles gives examples of a few arguments we may want to provide in
>> the future, all of which have nothing to do with whether the url is
>> single-use or reusable.
>>
>
> This is all fine.  It's only the argument that booleans are so much more
> opaque than other argument types (numbers, at least) that I find
> unconvincing.

As someone who occasionally has to look up if the 3rd argument to  
XMLHttpRequest.open() means sync or async, I agree with Tab. And that's  
something I've been using for years. Forget about synthetic keyboard  
events [1]:

event.initKeyEvent("keypress", true, true, null, null, false, false,  
false, false, 9, 0);

[1] Example cribbed from  
http://ariya.ofilabs.com/2011/08/hall-of-api-shame-boolean-trap.html

-- 
Mike Taylor
Opera Software
Received on Friday, 27 January 2012 04:46:23 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:50 GMT