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

replace keyword from with to if #71

Merged
merged 1 commit into from
Jun 16, 2020
Merged

replace keyword from with to if #71

merged 1 commit into from
Jun 16, 2020

Conversation

xtuc
Copy link
Member

@xtuc xtuc commented Jun 15, 2020

Refs #3

@xtuc
Copy link
Member Author

xtuc commented Jun 15, 2020

I will also update the syntax section of the README with an explanation before we merge this.


```html
<script src="foo.wasm" type="module" withtype="webassembly"></script>
<script src="foo.wasm" type="module" iftype="webassembly"></script>
Copy link
Member

Choose a reason for hiding this comment

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

not that it's really up to this proposal, but withtype/iftype seem weird to me; i'd expect if-type or if:type or something else that indicated a hierarchy.

Copy link
Member

Choose a reason for hiding this comment

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

The name here is intended to match HTML attribute naming conventions. See https://w3ctag.github.io/design-principles/#casing-rules

Copy link
Member

Choose a reason for hiding this comment

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

that talks about concatenating multi-word things, like "max length" - "if type" isn't a single word, it's a hierarchy, and it is very not clear to me that "iftype" is the thing these principles dictate. it seems more like this is a case those principles simply haven't considered.

certainly this PR/repo isn't the place to discuss it tho :-) i'd appreciate a link, if you have one and when the time is relevant, to the appropriate place

Copy link
Member

Choose a reason for hiding this comment

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

Would it be OK if the MVP web integration did not include specifying import attributes on the script tag? I think this can be delayed until we have a type on the web that motivates the use case.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think showing the HTML example illustrate possible uses cases, but maybe we should make it clear that it's not meant for TC39?

Copy link
Member

Choose a reason for hiding this comment

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

Isn’t JSON the web type motivating the entire proposal?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, initially (though other module types are also considered part of the motivation), and it does not make sense to have a script tag with a JSON module--it would not do anything, since there's no way to get the exports out of a module in a script tag.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added a sentence to make it clear that it's outside of TC39

Copy link
Member

@littledan littledan left a comment

Choose a reason for hiding this comment

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

LGTM, but please write in the explainer that the if name is designed to explain/evoke the "check" semantics, and that one could imagine a separate with section as a follow-on proposal for "evaluator" attributes.

Base automatically changed from sven/braces to master June 16, 2020 08:44
spec.html Outdated Show resolved Hide resolved
@xtuc xtuc merged commit 781ddb0 into master Jun 16, 2020
@xtuc xtuc deleted the sven/if branch June 16, 2020 19:52
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

Successfully merging this pull request may close these issues.

3 participants