Re: [whatwg/webidl] Give SharedArrayBuffer a dedicated type (PR #1311)

@annevk commented on this pull request.



> @@ -5465,6 +5465,8 @@ The <dfn id="dfn-string-type" export>string types</dfn> are
 {{DOMString}}, all [=enumeration types=],
 {{ByteString}} and {{USVString}}.
 
+The <dfn export>buffer types</dfn> are {{ArrayBuffer}} and {{SharedArrayBuffer}}.

Is it? The way it defines these types is in terms of objects, no? E.g., "buffer source types" references the same ArrayBuffer the typedef does. I'm not sure we can expect people to understand they're fundamentally different if the fundamental concepts are shared.

https://dontcallmedom.github.io/webdex/b.html#buffer%20source%20types%40%40webidl%25%25dfn shows there is some existing "confusion" around this.

The way I see it the types are comparable to classes and from that perspective and how we deal with those elsewhere in the web platform I think it all works.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/pull/1311#discussion_r1213074835
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/webidl/pull/1311/review/1455350535@github.com>

Received on Thursday, 1 June 2023 12:27:50 UTC