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

Re: APIs that overload numbers and strings

From: Anne van Kesteren <annevk@annevk.nl>
Date: Mon, 15 Apr 2013 17:11:35 +0100
Message-ID: <CADnb78hmYpgWOY0Eiqt2qF36Oi8e=Q5HkNxY9iZo0UJdjTHKgA@mail.gmail.com>
To: Ehsan Akhgari <ehsan.akhgari@gmail.com>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, Allen Wirfs-Brock <allen@wirfs-brock.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On Mon, Apr 15, 2013 at 5:01 PM, Ehsan Akhgari <ehsan.akhgari@gmail.com> wrote:
> Hmm, OK, that seems fine, albeit ugly.

You could always do enum LegacySomething { "1" , ... }; and enum
Something and then have (LegacySomething or Something) as "type". But
yes, if you want to preserve the old API it's going to be ugly either
way.


--
http://annevankesteren.nl/
Received on Monday, 15 April 2013 16:12:02 UTC

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