Skip to content
This repository has been archived by the owner on Mar 19, 2018. It is now read-only.

booleans should default to false #15

Closed
domenic opened this issue Jul 8, 2015 · 1 comment
Closed

booleans should default to false #15

domenic opened this issue Jul 8, 2015 · 1 comment
Labels

Comments

@domenic
Copy link
Collaborator

domenic commented Jul 8, 2015

It looks like there are already lots of threads covering potential changes to the name and semantics that might impact this. But, wherever they land, they should not end up with a boolean that defaults to true. Web IDL even explicitly warns against this:

Warning

It is strongly suggested not to use default value of true for boolean-typed arguments, as this can be confusing for authors who might otherwise expect the default conversion of undefined to be used (i.e., false).

@RByers RByers added the spec label Jul 8, 2015
@RByers
Copy link
Member

RByers commented Jul 8, 2015

Ah, I wasn't aware of that guidance - thanks. I was trying to avoid double negative, but it's easy to just do that. I.e. doesntCancel instead of 'mayCancel.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants