RE: Spec Updates

> Yes, and I disagreed with that outcome because it is flat out different  from the other APIs we are designing for the web platform.

>We want consistency for developers. If you think APIs that use strings need constants, you should start by convincing APIs that already use this >string-pattern to adopt constants before unilaterally adding it to your own APIs. It's fine that you think you this is better API design, but you >should first convince the rest of the people working on the web platform before making incompatible designs. Otherwise developers end up with >a confusing mess.

It's hard to say using string constants is a poor design for the web platform when the WebIDL spec defines this as valid grammar: http://dev.w3.org/2006/webapi/WebIDL/#idl-constants. 

I'm not strongly opposed to removing the constants, as strings are meaningful on their own, whereas an integer needs to have a constant to give it meaning. However, do we have a solution for feature detection? Requiring developers to read the spec to find out which strings they can use seems a bit tedious.

If there is consensus in the working group to removing the constants, we should do so. However, if that is the case, we should also petition WebIDL to remove this grammar. 

Jatinder

Received on Thursday, 20 October 2011 17:58:22 UTC