Re: Why ignoring unknown mandatory constraints is not stupid

On 11/19/13 8:59 AM, Jim Barnett wrote:
> We've done enough thinking about mandatory constraints that I don't see any reason not to include them.  Furthermore, if we leave them out, what does our syntax look like?  Do we pass a constraints structure containing only the 'optional' item?  That will look strange.  Developers will expect to simply pass a list of constraints.  But if we let them do that, their apps will break when we introduce mandatory constraints.

I agree we shouldn't drop mandatory constraints.

A related question, which I don't think you're asking but people may be wondering about is how we'd remove unknown mandatory constraints in my proposal. How much work would that be on the implementation? The nice thing here is that webidl-bindings automatically filter out unknown dictionary keys, because webidl dictionaries don't allow them. From http://www.w3.org/TR/WebIDL/#idl-dictionaries :

> A dictionary value of typeDcan have key–value pairs corresponding to 
> the dictionary members defined onDand on any ofD’s inherited 
> dictionaries.<http://www.w3.org/TR/WebIDL/#dfn-inherited-dictionaries>

In fact, being able to use webidl dictionaries for constraints is a huge simplification (I think most people wrongly assumed this was already the case).

.: Jan-Ivar :.

Received on Tuesday, 19 November 2013 19:57:19 UTC