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

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.

Dom

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