W3C home > Mailing lists > Public > public-device-apis@w3.org > March 2012

Re: addEventListener and side effects (was: CfC to change Sensor approach, not progress current draft)

From: Dominique Hazael-Massieux <dom@w3.org>
Date: Thu, 22 Mar 2012 18:20:29 +0100
Message-ID: <1332436829.13943.38.camel@altostratustier>
To: Doug Turner <dougt@mozilla.com>
Cc: Robin Berjon <robin@berjon.com>, Frederick.Hirsch@nokia.com, public-device-apis@w3.org
Le jeudi 22 mars 2012 à 10:09 -0700, Doug Turner a écrit :
> I am worried about consistency.

I agree that consistency is important; but between consistency and doing
the right thing, I think the latter takes precedence.

Given the way the Web develops, I think there is very little chance we
can have a good degree of consistency since it's almost impossible to
deprecate APIs. I'm all for striving for consistency when two equivalent
solutions exist, but if the addEventListener-with-side-effect is
considered an inferior solution, I don't think we should push
consistency with that approach.

>   For example, consider the same developers that used device
> motion/orientation wants to use proximity.   It looks really familiar,
> but no.  they have to do extra stuff to make it work:
> 1) startup the device
> 2) possibility explicitly shutdown the device

(none of this is required in my proposal)

> 3) use a different syntax
> That is just depressing

I know; I hate how PHP APIs are ridiculously inconsistent, and I feel
the pain when we have to break consistency among Web APIs.

Received on Thursday, 22 March 2012 17:20:48 UTC

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