On Thu, Aug 12, 2010 at 11:44 AM, Jeremy Orlow <[email protected]> wrote:
> On Thu, Aug 12, 2010 at 10:55 AM, Andrei Popescu <[email protected]> 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.

~TJ

Reply via email to