mozilla / standards-positions

https://mozilla.github.io/standards-positions/
Mozilla Public License 2.0
645 stars 69 forks source link

JavaScript Standard Library Proposal (Builtin Modules) #147

Open annevk opened 5 years ago

annevk commented 5 years ago

Request for Mozilla Position on an Emerging Web Specification

Other information

This is what #145 and #146 build on, somewhat. A concern I've seen is that they don't block on this though as all the infrastructure could be moved outside "TC39 control".

domenic commented 5 years ago

Note that https://github.com/tc39/proposal-javascript-standard-library/issues/43 may be clarifying. In terms of actual normative work this is proposing, there is none yet from the proposal champions, but I've put together https://github.com/tc39/proposal-javascript-standard-library/pull/44 which represents one direction the champions maybe-possibly might be interested in.

littledan commented 5 years ago

To summarize some of the issues under discussion:

TC39's most recent discussion was at the November 2018 meeting in a breakout session, see notes. The notes are pretty high-level, but we discussed each of those issues listed above.

The current import-maps/kv-storage origin trial takes some opinions on these questions:

Current specifications and drafts layer the module map, module resolution and polyfilling in HTML (or WebIDL to potentially populate the module map); I haven't seen a concrete technical proposal for putting any of these in the JavaScript specification.

I'm not a big fan of focusing on "TC39 control"; let's just work together towards a common path for built-in modules coming from TC39 and Web APIs, integrating input from web developers and people working in various standards bodies.

dbaron commented 5 years ago

also cc @bholley

annevk commented 5 years ago

Thanks Daniel for that summary. We’ve discussed this internally and of the unresolved issues in TC39 we feel most strongly about having a single namespace for standardized APIs.

There’s precedent of APIs moving between standards bodies (ArrayBuffer) and precedent of APIs being shared across ecosystems (URL, TextDecoder, etc. can be found on the web and in Node.js).

The alternative would involve aliasing or worse, ending up with slightly different flavors of the same thing.

Ideally the governance is such that a name is not permanently allocated unless there’s commitment from multiple implementers, a standardized API, and a sufficiently large test suite.

(This should not preclude other ecosystems from having their own namespace.)