W3C home > Mailing lists > Public > public-device-apis@w3.org > April 2010

Re: A proposal for parameter style

From: Eric Uhrhane <ericu@google.com>
Date: Wed, 28 Apr 2010 09:38:54 -0700
Message-ID: <s2h44b058fe1004280938n5696125dxdade8e28bf87612@mail.gmail.com>
To: Robin Berjon <robin@robineko.com>
Cc: Anselm R Garbe <garbeam@gmail.com>, public-device-apis@w3.org
On Wed, Apr 28, 2010 at 5:55 AM, Robin Berjon <robin@robineko.com> wrote:
> On Apr 28, 2010, at 12:04 , Anselm R Garbe wrote:
>>> WDYT?
>> I agree with Andrei. Can't see why your current situation is more complex.
> Throughout the stack there is greater variety than if we were considering the design of a single API (just because each API is independent doesn't mean we shouldn't look at the ecosystem, and more specifically at how hard it would be for someone to learn all of them).

If you're going to look at the whole ecosystem, you also have to
include the other APIs that already exist in user agents that will be
implementing these new ones.  The first thing that stands out is that
they're not terribly consistent.  The second is that your new proposal
is quite different from most of what's there.

I think it's a mistake to say that callbacks should always be first if
some of them are likely to be optional, but I favor even that over
forcing all APIs to wrap their parameters in an extra object.  It
feels cumbersome, and removes even the minimal help that JavaScript
gives you with parameter passing [positionality]--if you misspell your
parameter, it's now null.

Received on Wednesday, 28 April 2010 16:39:40 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:32:19 UTC