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

Re: [ACTION-43] (sdp related objects and global namespace) - way forward

From: Cullen Jennings <fluffy@iii.ca>
Date: Thu, 28 Jun 2012 09:38:39 -0700
Cc: Dominique Hazael-Massieux <dom@w3.org>, Bjoern Hoehrmann <derhoermi@gmx.net>, "public-webrtc@w3.org" <public-webrtc@w3.org>
Message-Id: <46E418E4-59DA-419C-A298-FB3F73DD80D2@iii.ca>
To: Stefan Hakansson LK <stefan.lk.hakansson@ericsson.com>

Objects that declare all their members in the constructors tend to optimize better. They also have a much clearer intent of what we are trying to represent here - logically speaking this is not a dictionary though clearly a dictionary could be used as one way to implement it. They also make it easier to add methods later - this might be slightly controversial but given a bunch of people want it, seems like we should at least keep that future door open for now.  If we were using any language other than JS which blurs the distinction between objects and dictionaries, we would not even be having this discussions and would have just declared a class or extensible structure for this. 

Is there any concrete argument for dictionary over object for the thing that holds the SDP? 

I normally don't care too much about the things like this that only change the syntax and not the semantics of what is possible. But one way or another, I'd like to wrap up this thread and move forward. 

On Jun 27, 2012, at 2:09 , Stefan Hakansson LK wrote:

> On 06/27/2012 08:15 AM, Dominique Hazael-Massieux wrote:
>> Le mardi 26 juin 2012 à 20:20 +0200, Bjoern Hoehrmann a écrit :
>>> Well, PeerConnection.localDescription and .remoteDescription would have
>>> to be changed aswell since they are SessionDescription attributes, and
>>> attributes cannot be dictionaries in WebIDL.
>> Good point, I had missed that; I guess they would have to be declared as
>> "object" with their actual structure defined in the prose.
> So would not that be the same as what the SessionDescriptionCallback is provided with, e.g. an object à la {sdp:"m=lotsofmumbo", type:"offer"}?
>> Dom
Received on Thursday, 28 June 2012 17:59:20 UTC

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