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 11:06:46 +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: <A222C88B6882744D8D4B9681B3158890295FEFAA@ESESSMB307.ericsson.se>
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.

/Adam
Received on Thursday, 3 March 2016 11:07:21 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 3 March 2016 11:07:22 UTC