Re: Why is RTCIceCandidate mutable

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
WebIDL.

> 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
different.

Received on Wednesday, 5 November 2014 04:48:42 UTC