W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2013

Re: APIs that overload numbers and strings

From: Ehsan Akhgari <ehsan.akhgari@gmail.com>
Date: Mon, 15 Apr 2013 12:01:28 -0400
Message-ID: <CANTur_6283gmz8batMT7KMwn1hfRn6J7zvk0Kd0UTbGfP3pEWQ@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: Allen Wirfs-Brock <allen@wirfs-brock.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On Mon, Apr 15, 2013 at 11:07 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 4/14/13 9:09 PM, Ehsan Akhgari wrote:
>
>> Changing the type of the attribute here to string doesn't seem like a
>> great idea to me because it will hide the enumerated nature of the
>> string used here.
>>
>
> We'd still use an enum:
>
>   enum Something {
>     "0", "1", "2", "whatever"
>   };
>

Hmm, OK, that seems fine, albeit ugly.

--
Ehsan
<http://ehsanakhgari.org/>
Received on Monday, 15 April 2013 16:02:38 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:49 UTC