Re: Remove numeric constants from WebRTC

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