W3C home > Mailing lists > Public > public-webrtc@w3.org > November 2014

Re: Why is RTCIceCandidate mutable

From: Martin Thomson <martin.thomson@gmail.com>
Date: Tue, 4 Nov 2014 20:48:14 -0800
Message-ID: <CABkgnnWE+V_3Pu8jAD_VnWCU9nwLSwu80mtnxDG=pcE3P4DW5w@mail.gmail.com>
To: Jan-Ivar Bruaroey <jib@mozilla.com>
Cc: public-webrtc@w3.org
On Nov 4, 2014 6:55 PM, "Jan-Ivar Bruaroey" <jib@mozilla.com> wrote:
> This again. Dictionaries can always be empty, so requiring them seems
futile. If we're going to require arguments, why not use required
arguments? [1]

I'm talking prose. Throw if required and not present. Not everything has to
be in the WebIDL.

That is, if we actually have a use for the constructor. I've been operating
on the assumption that we do, but the dictionary is adequate for any
purpose this object might serve.

>>   I would prefer that script only be allowed to
>> create candidates that are basically valid.  Syntax checking might be
>> deferred, but I see no reason to permit a missing or null candidate
>> value.
> I used to think so, but changed my mind when I discovered two things:
> It would require prose for each event to throw on missing argument,
making it embarrassingly obvious that we're using the wrong construct.

I don't see a problem with that. See above re: solving everything with

> Mozilla's webidl compiler auto-generates all events for us, including the
init-dictionary pattern, and it naturally generates nullable attributes
since that's internally consistent, absent a context-specific reason for it
to be otherwise.

This isn't an event.

> Fwiw I've been told that editors prefer separate PRs for nits and syntax
fixes. In my experience this also boosts their chance of landing
considerably compared to being chained to any of my actual proposals ;-)

I know. Splitting these only creates more work for me. Proposals are
Received on Wednesday, 5 November 2014 04:48:42 UTC

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