-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wording change: Don't use asserts for validating argument types #518
Wording change: Don't use asserts for validating argument types #518
Conversation
On first quick look this seems incomplete. |
For algorithms that are specifying a method declared by WebIDL that's not typically done; the WebIDL declaration is considered sufficient to specify the types. From WebIDL:
That's different than how internal algorithms are declared, where there is no other source defining the types. From Infra:
As noted in one of the commit comments, this PR doesn't go in and define all parameter types for all internal algorithms, just where there had previously been asserts. It would be good follow-up work to do so, but I wanted to keep the PR focused. |
These don't improve readability of the spec. To keep this commit focused, it does not touch similar assertions for internal algorithms. (Also, convert one NOTE into an ISSUE since it represents pending spec work.) For webmachinelearning#455
Improve internal algorithm readability by including the type of parameters in the declaration of the algorithm, rather than as assertions. This commit just touches the algorithms with assertions. Other algorithms could be improved with parameter type declarations, but that'll be a follow-up. For webmachinelearning#455
df26d22
to
252631b
Compare
@inexorabletash Thanks for the change. This is another "best practice" change that ideally we should put into a convention guidelines doc along with the ID naming convention in another PR, so that the spec can be consistent after this change going forward. |
As suggested by @wchao1115 in webmachinelearning#499 and webmachinelearning#518, create a doc capturing past WG disscussions in the telecons, issues, and PRs, so that we can be consistent going forward.
As suggested by @wchao1115 in webmachinelearning#499 and webmachinelearning#518, create a doc capturing past WG disscussions in the telecons, issues, and PRs, so that we can be consistent going forward.
As suggested by @wchao1115 in webmachinelearning#499 and webmachinelearning#518, create a doc capturing past WG disscussions in the telecons, issues, and PRs, so that we can be consistent going forward.
As suggested by @wchao1115 in webmachinelearning#499 and webmachinelearning#518, create a doc capturing past WG disscussions in the telecons, issues, and PRs, so that we can be consistent going forward.
…525) As suggested by @wchao1115 in #499 and #518, create a doc capturing past WG disscussions in the telecons, issues, and PRs, so that we can be consistent going forward.
For completeness: text about asserts and algorithm declarations/definitions was included in the initial landing of |
SHA: 5c3e2f9 Reason: push, by wchao1115 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…achinelearning#518) * Wording change: Drop arg type assertions for methods defined by WebIDL These don't improve readability of the spec. To keep this commit focused, it does not touch similar assertions for internal algorithms. (Also, convert one NOTE into an ISSUE since it represents pending spec work.) For webmachinelearning#455 * Wording change: Convert algorithm type assertions into parameter types Improve internal algorithm readability by including the type of parameters in the declaration of the algorithm, rather than as assertions. This commit just touches the algorithms with assertions. Other algorithms could be improved with parameter type declarations, but that'll be a follow-up. For webmachinelearning#455
This PR has two changes, and is submitted as two commits for ease of review, although it's a single "theme" so one PR:
For #455
Preview | Diff