Re: Ideal? (was Re: WebIDL-compatible syntax compromise)

On 2014-04-02 18:23, Harald Alvestrand wrote:
> On 04/02/2014 06:05 PM, Jan-Ivar Bruaroey wrote:
>> On 4/2/14 11:28 AM, Harald Alvestrand wrote:
>>> the typical "I must have a size in this range but would really prefer
>>> that
>>> size" example could be expressed as
>>>
>>> constraints = {
>>>      required: "width",
>>>      width: {min: 230, max: 1024},
>>>      advanced: [{width: 640}]
>>> }
>>
>> This is no worse than in the existing spec, but yes, you probably hit
>> the simplest need for advanced right there, since we can't write:
>>
>> var constraints = {
>>     required: "width",
>>     width: {min: 230, max: 1024},
>>     width: 640, // error: object property repeat!
>> };
>>
>> Would people be open to (re)consider the 'ideal' extension?
>>
>> var constraints = {
>>     required: "width",
>>     width: {min: 230, max: 1024, ideal: 640},
>> };
>
> I'd be open to reconsidering that once we've declared consensus for a
> single proposal and put it into the document..... I see some nice things
> about "ideal", but regard it as a separable concern.

+1 to both statements.


Received on Wednesday, 2 April 2014 18:05:30 UTC