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

Define initializing variables and setting them? #88

Closed
annevk opened this issue Mar 20, 2017 · 3 comments
Closed

Define initializing variables and setting them? #88

annevk opened this issue Mar 20, 2017 · 3 comments

Comments

@annevk
Copy link
Member

annevk commented Mar 20, 2017

I.e., let and set. We could do that with <dfn>, but I don't think we want to require documents to link instances.

@annevk
Copy link
Member Author

annevk commented Mar 20, 2017

(Additional question here is whether the type of a variable is allowed to change. I'd say no...)

@domenic
Copy link
Member

domenic commented Mar 20, 2017

This seems trivial but people seem to really appreciate guidance here. See e.g. https://garykac.github.io/procspec/ "local variables" section.

Agreed we can get away with no <dfn> here, similar to our current "return"/"throw".

One thing to also give clarity on is the "scope" of definitions. E.g. we've been trying to avoid declaring variables with "let" inside of "if" blocks.

I think the type of a variable isn't something we should touch, or at least we shouldn't go beyond a "should" recommendation. Specs are not strongly-typed enough for any recommendation here to make general sense.

@tobie
Copy link
Collaborator

tobie commented Mar 20, 2017

Yeah, there's lots of disagreement here, see for example: whatwg/webidl#323 (comment).

annevk added a commit that referenced this issue Mar 23, 2017
Also add a note on performance for #82.

Fixes #88.
annevk added a commit that referenced this issue Mar 24, 2017
Also add a note on performance for #82.

Fixes #88.
annevk added a commit that referenced this issue Mar 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants