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

Re: Spec question: Declaration of IceCandidate

From: Harald Alvestrand <harald@alvestrand.no>
Date: Tue, 19 Jun 2012 13:49:02 +0200
Message-ID: <4FE0672E.60706@alvestrand.no>
To: Dominique Hazael-Massieux <dom@w3.org>
CC: public-webrtc@w3.org
On 06/19/2012 11:19 AM, Dominique Hazael-Massieux wrote:
> Le mardi 19 juin 2012 à 10:45 +0200, Harald Alvestrand a écrit :
>> not using a dedicated interface now will mean that we have to support
>> simple JavaScript objects forever, I assume.
> Indeed, but given that the said objects in the current proposal would be
> used as parameter for the constructor, I don't think this creates any
> particular cost — or does it?
>
Simple object:

foo = { x: ww, y: zz }
InterfaceCall(foo)

InterfaceCall has to check that x and y are present.

Dedicated object:

foo = new FooObject( { x: ww, y: zz } )
InterfaceCall(foo)

InterfaceCall has to check that foo is of type FooObject.

Do I understand you correctly in what you mean by "using a javascript 
object"?

If yes, and we have versions 1 and 2, 1 has Object as parameter, 2 has 
FooObject:

1) version 1 is published
2) 10.000 programmers write code for it
3) version 2 is published

Is version 2 backwards compatible, or do we have to declare that 
InterfaceCall has a parameter of type "Object or FooObject" in order not 
to break those 10.000 programmers' code?
That's exactly the way we broke code in one of the many changes to 
webkitPeerConnection (now deprecatedPeerConnection), I believe; once the 
spec has 10.000 users, I'd like to not make that type of change any more.

                    Harald
Received on Tuesday, 19 June 2012 11:49:32 UTC

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