- From: Cullen Jennings <fluffy@iii.ca>
- Date: Thu, 28 Jun 2012 09:38:39 -0700
- To: Stefan Hakansson LK <stefan.lk.hakansson@ericsson.com>
- Cc: Dominique Hazael-Massieux <dom@w3.org>, Bjoern Hoehrmann <derhoermi@gmx.net>, "public-webrtc@w3.org" <public-webrtc@w3.org>
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