Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite with a stronger dependency on package name maps #33

Closed
wants to merge 1 commit into from

Conversation

domenic
Copy link
Collaborator

@domenic domenic commented Aug 3, 2018

This incorporates some of the ideas touched on in the issue tracker, mostly around using package name maps to provide a better fallback story and web developer control. It touches on the following issues:

It also adds a bit more motivation to the intro, and rearranges to emphasize the standards process, before diving into many details on the importing infrastructure.

For now we delete the "Trying these ideas out" section, and spec.md, as they are all about the old infrastructure.


Review much appreciated. I'd suggest just re-reading the entire doc using the rendered view on GitHub.

The layeredapi: URL scheme is an interesting aspect here. I'd like to get folks' reactions to it, especially if they are negative. In a package name map based system, it is most natural to have a package -> URL mapping, and so we need some URL system to exist to map to. We could re-conceptualize how package name maps work, or add special exceptions for built-in packages/LAPIs, maybe. But this makes the most sense to me. Still, I'm wary of the extra complexity it adds.

This incorporates some of the ideas touched on in the issue tracker, mostly around using package name maps to provide a better fallback story and web developer control. It touches on the following issues:

* Fixes #10, fixes #14, fixes #15, and fixes #24 by moving away from std:x|y and its attendant problems.
* Opens the door to solutions for #5 based on the speculative package name map fallback ideas.

It also adds a bit more motivation to the intro, and rearranges to emphasize the standards process, before diving into many details on the importing infrastructure.

For now we delete the "Trying these ideas out" section, and spec.md, as they are all about the old infrastructure.
@domenic domenic requested a review from ojanvafai August 3, 2018 22:31

We propose a renewed focus in the web-standards space on higher-level APIs. In particular, we'd propose a marketing-brand of "layered APIs" for high-level API standardization efforts which follow these two constraints:

- **Layered**: Their specifications _must not_ use any "magic" that is inaccessible to web developers, i.e. they must be layered on top of the platform's existing lower-level features. A concrete way of stating this is that a web developer must be able to implement a given layered API's specification, purely in unprivileged JavaScript.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this include implementing an API in an engine that does not yet support it, at the relevant URL (not just a bare package name alias)?

Copy link
Collaborator Author

@domenic domenic Aug 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No; layered APIs are implemented by engines that support them.

(Note, this sentence was preexisting, just moved around.)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the value in ensuring that layered APIs can be implemented in JS, when it'd be impossible to transparently provide a missing layered API using JS? (iow, when in practice would anyone ever actually implement a layered API in JS, except to polyfill it?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The benefits of layering on top of primitives are explained elsewhere in the README (both the current one in the repo and the one in this PR).

Perhaps this would be less confusing if we removed the last sentence, since it's just an operationalization of the layering requirement.

@domenic domenic mentioned this pull request Aug 20, 2018
@domenic domenic added fallback syntax An issue with the syntax for falling back from a LAPI to a polyfill fallback semantics An issue with the proposed model for falling back from a LAPI to a polyfill labels Aug 20, 2018
@domenic domenic closed this Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fallback semantics An issue with the proposed model for falling back from a LAPI to a polyfill fallback syntax An issue with the syntax for falling back from a LAPI to a polyfill
Projects
None yet
2 participants