mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
Docs: Prefer closely matching explicit spec AO names
This commit is contained in:
parent
0d1ce48071
commit
18a160e0e9
Notes:
github-actions[bot]
2025-02-27 07:41:19 +00:00
Author: https://github.com/sideshowbarker
Commit: 18a160e0e9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3689
Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 16 additions and 0 deletions
|
@ -35,6 +35,22 @@ class Filedescriptor;
|
|||
String MIME_Type();
|
||||
```
|
||||
|
||||
When implementing spec algorithms and other constructs that a spec explicitly names, prefer closely matching the same names the spec uses, whenever possible.
|
||||
|
||||
Given the construct at https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#suffering-from-being-missing which has the literal name _“Suffering from being missing”_ in the spec, for example:
|
||||
|
||||
###### Right:
|
||||
|
||||
```c++
|
||||
bool HTMLInputElement::suffering_from_being_missing(); // exactly matches the spec naming
|
||||
```
|
||||
|
||||
###### Wrong:
|
||||
|
||||
```c++
|
||||
bool HTMLInputElement::has_missing_constraint(); // arbitrarily differs from spec naming
|
||||
```
|
||||
|
||||
Use full words, except in the rare case where an abbreviation would be more canonical and easier to understand.
|
||||
|
||||
###### Right:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue