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

Better support for named argument calling #1758

Open
domenic opened this issue Aug 27, 2020 · 6 comments
Open

Better support for named argument calling #1758

domenic opened this issue Aug 27, 2020 · 6 comments

Comments

@domenic
Copy link
Collaborator

domenic commented Aug 27, 2020

I'm starting to use the pattern in whatwg/infra#325 and it's not working that great.

I have to use

<a for=ReadableStream/create><var ignore>highWaterMark</var></a>

but I'd like to use something like

[=ReadableStream/create/|highWaterMark|=]

Any ideas?

@domenic
Copy link
Collaborator Author

domenic commented Aug 27, 2020

It's also important that these <var>s not get highlighted by the var-highlighting JS when clicked.

@tabatkins
Copy link
Collaborator

Yeah that looks real bad.

How would you feel about <arg>ReadableStream/create/highWaterMark</arg>?

@domenic
Copy link
Collaborator Author

domenic commented Aug 28, 2020

Works for me. I kinda like my markup shorthands instead of HTML tags, but I don't insist by any means, and I assume you're running out of character combinations :).

@tabatkins
Copy link
Collaborator

Yeah, I'm trying to limit grawlix in general; there's still plenty of space in the [$..$] style of tags, but short tagnames are nice too ^_^

@jyasskin
Copy link
Collaborator

Since a call is likely to have several arguments scoped to the same algorithm, I think we'll want to be able to default the ReadableStream/create part. As mentioned in whatwg/infra#320 (comment),

<call>[=ReadableStream/create=] with a <arg>highWaterMark</arg> of |value|</call>

might be a good syntax, where the algorithm name provides the default for= value for <arg>s. If <call> isn't in the cards for a while, we'll want to have something like

<span arg-for="ReadableStream/create">[=ReadableStream/create=] with a <arg>highWaterMark</arg> of |value|</span>

@tabatkins
Copy link
Collaborator

Yup, definitely my thought too.

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

No branches or pull requests

3 participants