- From: Tobie Langel <notifications@github.com>
- Date: Mon, 21 Nov 2016 13:06:12 -0800
- To: heycam/webidl <webidl@noreply.github.com>
- Message-ID: <heycam/webidl/issues/240/262067011@github.com>
Adding @tabatkins's comments on irc here below: > The distinction y'all are looking for is the notion of "kinds" from type theory. Values are the lowest kind, types are the next highest (they can be instantiated to produce a value), and type constructors are the next highest after that (they can be instantiated to produce a type). The kind hierarchy is infinite, of course. > If values are kind 1, types are kind 2, etc, then "dictionary" or "record" are kind-3 things. > The IDL definitions types in Bikeshed are meant to capture kind-2 things. There's nothing official for kind-3, because there's no call for it, so they instead fall into the generic "dfn" bucket. > Then you've also got the kind-2 things like "sequence<DOMString>". They're definitely kind-2, types, because when they're instantiated they produce values (an array of strings, in this case). > They're just *anonymous* types, which aren't handled by the Bikeshed linking model. As far as I can tell, you don't really need it, either. You instead want to link to "sequence" (the kind-3 thing) and "DOMString" (the kind-2 thing). If you use typedef to give a name to it, tho, like "typedef sequence<DOMString> NameList;", then "NameList" is a kind-2 thing, a type, with a name that can be referred with Bikeshed's linking model. -- 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/240#issuecomment-262067011
Received on Monday, 21 November 2016 21:06:52 UTC