Re: Specifying multiple Optional constraints

On 09/11/2013 2:58 AM, Jan-Ivar Bruaroey wrote:
> But I agree you still can't combine requirements, and I find the logic 
> hard to read to boot.
>
> I proposed an alternative here 
> http://lists.w3.org/Archives/Public/public-media-capture/2013Oct/0069.html 
> (near bottom).
>
> The whole thing is just an (AND)OR array of alternative requirements:
>
>  [
>    { width: 1920, height: 1080 },
>    { width: { max: 1920 }, height: { max: 1080 } },
>  ]
>
> IMHO simpler (no mandatory/optional), easier to read, easier to 
> implement, and more expressive.
>
> .: Jan-Ivar :.

+1

I've never understood the benefit of splitting constraints into 
mandatory/optional. The format you mentioned should suffice.

Gili

Received on Saturday, 9 November 2013 08:04:05 UTC