You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at WebGPU (the closest aligned existing W3C spec), we see lowercase d in enum strings and uppercase D in class/field identifiers. I didn't see any function names, but presumably they would be more consistent with field names than enum strings.
Treat abbreviations like acronyms in names as whole words, i.e. use loadHttpUrl, not loadHTTPURL, unless required by a platform name (e.g. XMLHttpRequest).
// Good identifiers:
dnsConnectionIndex // Most people know what "DNS" stands for.
referrerUrl // Ditto for "URL".
customerId // "Id" is both ubiquitous and unlikely to be misunderstood.
// Disallowed identifiers:
...
customerID // Incorrect camelcase of "ID".
// bad
import SmsContainer from './containers/SmsContainer';
const HttpRequests = [ ... ];
// good
import SMSContainer from './containers/SMSContainer';
const HTTPRequests = [ ... ];
Future considerations
This might be mostly a moot point upon extending conv2d/convTranspose2d/resample2d/averagePool2d/l2Pool2d/maxPool2d to be more generic than just 2 dimensions, but it still applies to ScatterNd/ND.
The text was updated successfully, but these errors were encountered:
From comment #805 (comment), the API naming is internally inconsistent:
resample2d
,conv2d
,scatterND
- currentresample2d
,conv2d
,scatterNd
- rename scatterNd to be consistent with precedentresample2D
,conv2D
,scatterND
- rename existing functions to uppercase DThe initial TAG review had no casing feedback, and the guidance here https://w3ctag.github.io/design-principles/#casing-rules isn't so clear. Thanks @anssiko.
Precedent
WebGPU
Looking at WebGPU (the closest aligned existing W3C spec), we see lowercase
d
in enum strings and uppercaseD
in class/field identifiers. I didn't see any function names, but presumably they would be more consistent with field names than enum strings.class names:
field names:
enums:
Other external guides
I see conflicting recommendations out there.
Favoring
Nd
:https://google.github.io/styleguide/tsguide.html#descriptive-names
Favoring
ND
:https://github.com/airbnb/javascript?tab=readme-ov-file#naming--Acronyms-and-Initialisms
Future considerations
This might be mostly a moot point upon extending
conv2d
/convTranspose2d
/resample2d
/averagePool2d
/l2Pool2d
/maxPool2d
to be more generic than just 2 dimensions, but it still applies toScatterNd
/ND
.The text was updated successfully, but these errors were encountered: