W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2010

Re: [IndexedDB] question about description argument of IDBFactory::open()

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 12 Aug 2010 13:24:34 -0700
Message-ID: <AANLkTi=busXhs+BZCjmHPU1NzUGQP7Cyb_R5O=4N5et2@mail.gmail.com>
To: Jeremy Orlow <jorlow@chromium.org>
Cc: Andrei Popescu <andreip@google.com>, Pablo Castro <Pablo.Castro@microsoft.com>, Jonas Sicking <jonas@sicking.cc>, Shawn Wilsher <sdwilsh@mozilla.com>, Webapps WG <public-webapps@w3.org>
On Thu, Aug 12, 2010 at 11:44 AM, Jeremy Orlow <jorlow@chromium.org> wrote:
> On Thu, Aug 12, 2010 at 10:55 AM, Andrei Popescu <andreip@google.com> wrote:
>> Given that open() is one of those functions that are likely to grow in
>> parameters over time, I wonder if we should consider taking an object as the
>> second argument with names/values(e.g. open("mydatabase", { description:
>> "foo" }); ). That would allow us to keep the minimum specification small and
>> easily add more parameters later without resulting un hard to read code that
>> has a bunch of "undefined" in arguments.
>> The only thing I'm not sure is if there is precedent of doing this in
>> one of the standard APIs.
> That sounds great to me.

Thank god, maybe we can *finally* make this a pattern in the web
platform.  Javascript's lack of keyword parameters is already a pain;
the inexplicable resistance to adding this common hack around that
into the web platform has pained me every time.

Received on Thursday, 12 August 2010 20:28:19 UTC

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