W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2012

The [ArrayClass], [Clamp], [EnforceRange] and [ImplicitThis] extended attributes.

From: Marcos Caceres <marcosscaceres@gmail.com>
Date: Sat, 17 Mar 2012 13:55:24 +0000
To: public-script-coord <public-script-coord@w3.org>
Message-ID: <8529E8FCBEEF4317A9733E933660B4EA@gmail.com>
Hi Cam,    
The spec says the following are "at risk":  

"The [ArrayClass], [Clamp], [EnforceRange] and [ImplicitThis] extended attributes."

(The following also applies to the other features at risk, I guess… though I haven't needed to use those, which is why I don't discuss them or have an opinion about them)

For us that are new to the list, in the Editor's draft, can you please add a link to threads where it was decided that there were at risk (or explain why). And could you please add a warning in place that these are features at risk in the corresponding sections of the spec. I proudly used [Clamp] in one of my specs (and made a ref implementation) and only just noticed that it was at risk (d'oh!) :(.  

Not sure how "at risk" [Clamp] is, but I like it and would like to see it remain in the spec… if only to catch some corner cases. I currently use it to clamp negative numbers on a dictionary item to an unsigned long.  

And while I'm here… [EnforceRange] could be made much more useful if one could declare the range explicitly:

[EnforceRange=0..50]  (or some such)

Of course, if no explicit range is given, then EnforceRange just uses the data type's range.  

Use case: enforcing arbitrary numerical ranges, particularly useful for percentages, degrees, etc. I really wanted this feature for some device APIs I was working on (though they are not "Web platform" ones, so I won't bother using them as any credible evidence).  
Kind regards,
Marcos Caceres
Received on Saturday, 17 March 2012 13:55:53 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:05 UTC