W3C home > Mailing lists > Public > public-media-capture@w3.org > March 2016

Re: Using enums to avoid default true in "settings dictionaries" (#466, #467, #471)

From: Adam Bergkvist <adam.bergkvist@ericsson.com>
Date: Thu, 3 Mar 2016 18:18:11 +0000
To: Peter Thatcher <pthatcher@google.com>, Jan-Ivar Bruaroey <jib@mozilla.com>
CC: Martin Thomson <martin.thomson@gmail.com>, Harald Alvestrand <harald@alvestrand.no>, "public-media-capture@w3.org" <public-media-capture@w3.org>
Message-ID: <A222C88B6882744D8D4B9681B315889029600D9D@ESESSMB307.ericsson.se>
On 2016-03-03 12:08, Adam Bergkvist wrote:
> On 2016-02-25 21:47, Peter Thatcher wrote:
>> There is a very clear reason to *not* follow the warning:  It makes our
>> API calls worse.  We've tried many times, and we can't come up with
>> something that avoids the hazard without being very ugly.
> Speaking of ugly, I know that people expressed opinions that keeping the
> booleans and inverting the meaning of our settings members were ugly
> (when expressed as a double negation). But I think it's fine to have
> 'disableVoiceActivityDetection = false;' in our IDLs since it would
> hardly every be used in any code. Why explicitly set the default value
> again?
> var options = { disableVoiceActivityDetection: true };
> I think that's perfectly fine for my special case where I want to turn
> off a feature that is enabled by default since that's how most people
> would use it.

A bit like:

<input type="button disabled>


Received on Thursday, 3 March 2016 18:19:02 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:26:35 UTC