Re: Bug 23935 - Proposal: New syntax for constraints

On 4 December 2013 02:13, Harald Alvestrand <harald@alvestrand.no> wrote:
> [ { width: 4096, height: 2160 },
>   { width: 3840, height: 2160 },
>   { width: 2880, height: 1800 },
>   { width: { min: 1024, max: 4096 }, height: { min: 768, max: 2160 },
> aspect: { min: 1.6, max: 1.9 } ]
>
> In this example, I prefer certain resolutions I have tested with (even when
> higher ones are available), and only if I cannot get one of those exact ones
> will I accept a range, but no less than 1024x768. How would you express that
> today?
>
>
> Actually, this is ALMOST legal current syntax.
>
> { optional: [ { width: 4096, height: 2160 },
>
>   { width: 3840, height: 2160 },
>   { width: 2880, height: 1800 },
>   { width: { min: 1024, max: 4096 }, height: { min: 768, max: 2160 },
> aspect: { min: 1.6, max: 1.9 } ]
> }

Those two blocks of "constraints" are different.  Close but not identical.

The difference is that Jan-Ivar's proposal does not permit all options to fail.

(I don't consider the only one keys per optional constraint
restriction valid either.)

Received on Wednesday, 4 December 2013 19:08:13 UTC