W3C home > Mailing lists > Public > public-webrtc@w3.org > January 2012

Re: Remove numeric constants from WebRTC

From: Cullen Jennings <fluffy@cisco.com>
Date: Sun, 1 Jan 2012 11:08:09 +1100
Cc: Harald Alvestrand <harald@alvestrand.no>, public-webrtc@w3.org, hta@google.com
Message-Id: <6F49D96A-2F96-4B80-B3EE-676C86395CBF@cisco.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>

On Dec 31, 2011, at 3:19 , Tab Atkins Jr. wrote:

> On Thu, Dec 29, 2011 at 12:47 AM, Cullen Jennings <fluffy@cisco.com> wrote:
>> I'll note that using strings instead of integers is somewhat crappy when an API call needs to be mapped to ENUMs in other programming languages such as C.
> 
> We've moved away from caring about languages other than Javascript
> when designing web APIs; years of struggling with the turgid horror of
> the original DOM (designed for easy compat with Java) taught us that
> lesson.  ^_^  This is a large part of the reason why we created WebIDL
> rather than just continuing to use IDL.
> 
> That said, if an API like this does need to be expressed in another
> language where enums are more natural than strings, there's nothing
> wrong with defining an enum in their binding.  It should just stay out
> of the web-facing API binding, which is meant to favor JS.
> 
> ~TJ

Thanks - makes sense
Received on Sunday, 1 January 2012 00:08:42 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:17:24 UTC