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

[JS] Bikeshed usage/web spec conventions feedback #565

Closed
domenic opened this issue Sep 7, 2017 · 4 comments
Closed

[JS] Bikeshed usage/web spec conventions feedback #565

domenic opened this issue Sep 7, 2017 · 4 comments
Assignees

Comments

@domenic
Copy link
Member

domenic commented Sep 7, 2017

I realize the draft is pretty rough, but I wanted to provide some early guidance on things I noticed. I can't find the source so I'm not able to inspect it to help more, but just to start:

  • We don't generally typographically mark up "true" and "false" in web specs.
  • Use Infra where possible. E.g. instead of List, do [=list=]. Optionally you can then do things like [=list/For each=].
  • For ES abstract operations:
    • Add them to your anchors block (example)
    • Reference them later with <a abstract-op>Operation</a>(...) (example)
  • In general, don't use direct links into other specs; you want to set up your anchors block so that autolinking just works. This can be tricky but is worth it in general.
  • "compile a WebAssembly module":
  • compile(bytes):
    • We're trying to move away from performing steps after you've returned. So instead use a structure like https://www.w3.org/2001/tag/doc/promises-guide#explicit-async-steps which creates, performs in parallel steps, then returns.
    • Don't fulfill promises; resolve them.
    • Link to the promises guide for resolving/rejecting promises. It's not perfect but it's what everyone else does so when we fix the promises guide to be better you'll get the trickle-down effects.
  • "instantiate a WebAssembly module":
    • There seems to be a switch to monospace for variables; stick with |var|.
    • Link to Infra for Assert (just [=Assert=] should do it).
    • I guess in general this algorithm is still in the process of being converted, so I'll leave it alone.
@littledan
Copy link
Collaborator

Thanks for the review! I'll make these changes. You can find the source in https://github.com/littledan/spec/blob/new-js.bs/document/JS.bs if you're curious.

@domenic
Copy link
Member Author

domenic commented Sep 8, 2017

Great! Maybe you could add a link in the header back to the repository.

@littledan
Copy link
Collaborator

OK, I've made most of these changes and finished the initial conversion; you can see the first draft in https://littledan.github.io/spec/document/JS.html .

@ericprud
Copy link

ericprud commented Sep 5, 2018

@domenic, can this issue be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants