Re: Spec question: Declaration of IceCandidate

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