Skip to content

Commit 2a60543

Browse files
Default values should be the common choice (#522)
Closes #391. Co-authored-by: Peter Linss <[email protected]>
1 parent 5455001 commit 2a60543

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

index.bs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1641,6 +1641,13 @@ This is for legacy interoperability reasons,
16411641
not as an example of good design.
16421642
</div>
16431643

1644+
The default value should be the value
1645+
that most authors will choose,
1646+
if that choice is obvious.
1647+
For boolean attributes,
1648+
that might mean that the attribute name
1649+
needs to be chosen so that `false` is the common choice.
1650+
16441651
When deciding between different list data types for your API,
16451652
unless otherwise required, use the following list types:
16461653

@@ -1651,6 +1658,7 @@ unless otherwise required, use the following list types:
16511658
See also:
16521659

16531660
* [[#prefer-dictionaries]]
1661+
* [[#naming-optional-parameters]]
16541662
* <a href="https://lists.w3.org/Archives/Public/public-script-coord/2013OctDec/0302.html">APIs that have boolean arguments defaulting to true</a>
16551663

16561664
<h3 id="naming-optional-parameters">Name optional arguments appropriately</h3>

0 commit comments

Comments
 (0)