W3C home > Mailing lists > Public > public-webrtc@w3.org > December 2011

Re: Remove numeric constants from WebRTC

From: Randell Jesup <randell-ietf@jesup.org>
Date: Wed, 21 Dec 2011 10:18:05 -0500
Message-ID: <4EF1F8AD.5050507@jesup.org>
To: public-webrtc@w3.org
On 12/20/2011 10:48 PM, Harald Alvestrand wrote:
> On 12/20/2011 11:54 PM, Tab Atkins Jr. wrote:
>> In general, experience shows that people usually forgo the named
>> constant and just use the numbers instead, which is the worst outcome
>> possible, as it makes the code very difficult to read and understand.
>> Since using strings instead has no real downsides, and avoids all of
>> the downsides of numeric constants, they are now the preferred way to
>> handle this sort of thing.

> I see the logic. The lack of enums in the language hurts again.
> I still miss the ability to document (for programmers) in WebIDL what
> the permitted values are; is there a comment convention for doing that
> at the moment?

What about IDL dictionaries?

-- 
Randell Jesup
randell-ietf@jesup.org
Received on Wednesday, 21 December 2011 15:20:51 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:26 UTC