Re: Bug 23935 - Proposal: New syntax for constraints

On 12/14/13 10:46 AM, cowwoc wrote:
> On 13/12/2013 7:51 PM, Jan-Ivar Bruaroey wrote:
>> On 12/13/2013 6:25 PM, cowwoc wrote:
>>> On 13/12/2013 4:06 PM, Jan-Ivar Bruaroey wrote:
>>>> With my original declarative syntax this is a piece of cake:
>>>>
>>>> [
>>>>   { width: 1200, height: 900 },
>>>>   { width: 1600, height: 900 },
>>>>   {
>>>>     aspect: { min: 1.33, max: 1.34 },
>>>>     width: { min: 800, max: 1600 },
>>>>     height: { min: 600, max: 1200 }
>>>>   },
>>>>   {
>>>>     aspect: { min: 1.77, max: 1.78 },
>>>>     width: { min: 1280, max: 1920 },
>>>>     height: { min: 720, max: 1080 }
>>>>   },
>>>> ]
>>>>
>>>> Can I write you down as supporting it? ;-)
>>>
>>> It's not clear to me how browser is meant to implement the above 
>>> dictionary. I mean, does it scan from top to bottom and stop on the 
>>> first match?
>>
>> Yes. Or non-procedurally speaking, it's a list of preferred 
>> configurations.
>
> Okay. There is a lot of implicitness going on there. Meaning, the 
> first line is implicitly tied to an aspect ratio of 4:3 but it's not 
> obvious that that is the case. From a readability point of view, I was 
> hoping to tie condition 1 and 3 together and 2 and 4 together.

Nonsense. Specifying the aspect of exact dimensions is redundant, but 
you're welcome to include it if you like redundancy. The order is 
preferred order as you expressed it.

You seriously prefer 35 lines of code to an ordered list of criteria?

.: Jan-Ivar :.

Received on Saturday, 14 December 2013 17:22:24 UTC