- From: Kai Ninomiya <notifications@github.com>
- Date: Tue, 11 Feb 2020 09:25:31 -0800
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 11 February 2020 17:25:33 UTC
In WebGPU, we want the strongest possible typing on every input integer, because any kind of coercion would be extremely confusing to developers. I don't find it easier to read if we have to pepper `[EnforceRange]` on EVERY integer type throughout the entire spec, which is I proposed the `typedef`s in WebGPU (linked above). Plus, it is error-prone, as it's never obvious when an `[EnforceRange]` is missing - with the typedefs, any usage of a bare `long` is an error. If WebIDL won't allow `[EnforceRange]` on output types, then I would like to keep the `typedef`s and cherry-pick the places where we have to use undecorated integers. Could we get text in the spec about consts/return types/anything else, and ideally more validation checks (that would run in bikeshed) for invalid usages of `[EnforceRange]`? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/heycam/webidl/issues/842#issuecomment-584753518
Received on Tuesday, 11 February 2020 17:25:33 UTC