- From: Addison Phillips <notifications@github.com>
- Date: Wed, 22 Sep 2021 09:40:01 -0700
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 22 September 2021 16:40:13 UTC
Writing code that depends on a localizable value is a basic I18N anti-pattern. I don't disagree with you: some people's code probably does depend on the non-localization of some `message` values. But I'd like to encourage better architecture for the Web wherever possible. It's always tricky to try to retrofit I18N best practices onto what is already a vast installed base. We are forced to live with compromises we wouldn't have made if given the opportunity earlier. In this case, `DOMException` is in a tight spot--it is foundational for many specifications, but it is tied to (and thus limited by) JavaScript. If we can't fix `DOMException` directly, can we add guidance for specifications that extend it to write their own exceptions? Would that be an effective alternative? (It's not that `message` is the first argument, it's that there is no `new DOMException(name)`: you have to provide a `message` in order to provide a `name`) -- 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/1024#issuecomment-925098176
Received on Wednesday, 22 September 2021 16:40:13 UTC