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

Re: APIs that overload numbers and strings

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 15 Apr 2013 11:07:49 -0400
Message-ID: <516C17C5.5070802@mit.edu>
To: Ehsan Akhgari <ehsan.akhgari@gmail.com>
CC: Allen Wirfs-Brock <allen@wirfs-brock.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>
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"
   };

-Boris
Received on Monday, 15 April 2013 15:08:20 UTC

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