W3C home > Mailing lists > Public > public-audio@w3.org > July to September 2012

Using Web IDL enums instead of numeric constants

From: Ehsan Akhgari <ehsan.akhgari@gmail.com>
Date: Fri, 21 Sep 2012 11:55:02 -0400
Message-ID: <CANTur_5hoCRzQEjZqmNuqJ5WNjd26X-QXFFONX6R1Z9q4UHkXw@mail.gmail.com>
To: public-audio@w3.org
Hi all,

Should we consider using Web IDL enums instead of numeric constants for
things in the spec which are actually enumerated values?  The Web IDL
enumerations are strings which have the advantage of just having a
self-describing name, and Web IDL implementation will ensure that only
valid strings can be used when calling functions which accept those enums.
Please see http://www.w3.org/TR/WebIDL/#idl-enums for more information on
Web IDL enums.

Thanks!
--
Ehsan
<http://ehsanakhgari.org/>
Received on Friday, 21 September 2012 15:56:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 21 September 2012 15:56:13 GMT