W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2016

Re: How to use [EnforceRange] with union types and enums

From: Adam Bergkvist <adam.bergkvist@ericsson.com>
Date: Tue, 13 Sep 2016 13:34:44 +0000
To: Anne van Kesteren <annevk@annevk.nl>, Boris Zbarsky <bzbarsky@mit.edu>
CC: "public-script-coord@w3.org" <public-script-coord@w3.org>
Message-ID: <A222C88B6882744D8D4B9681B315889029835577@ESESSMB307.ericsson.se>
On 2016-09-13 15:23, Anne van Kesteren wrote:
> On Tue, Sep 13, 2016 at 3:12 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>> Maybe the right answer is to really make range-enforcement a property of the
>> type, nix the [EnforceRange] thing entirely and just have an "enforced long"
>> type and similar for other numeric types....
>
> That's what we ended up doing when we hit exactly this problem with
> ByteString/USVString (formerly [EnforceUTF16] DOMString or some
> such)...

Thanks for quick feedback.

Having a strict type that enforces range seems like flexible solution.

/Adam
Received on Tuesday, 13 September 2016 13:35:18 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 13 September 2016 13:35:18 UTC