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

SPEC: keyword expansion #742

Open
adamperlin opened this issue Jul 3, 2018 · 0 comments
Open

SPEC: keyword expansion #742

adamperlin opened this issue Jul 3, 2018 · 0 comments
Labels

Comments

@adamperlin
Copy link
Contributor

From ifql created by mark-rushakoff : influxdata/ifql#356

We don't need keyword expansion for MVP of the spec, but I wanted to raise the topic in case it's worth keeping in a later version and we need to reserve an operator now.

Keyword expansion allows the use of objects in place of writing out literal keywords in function arguments.

y = (m, x, b) => m * x + b

// Instead of:
y(m: 1, x: 3, b: 5)

// You can construct an object and use it directly:
args = {m: 1, x: 3, b: 5}
y(*args) // or y(**args), or y(args), or something else

We would also need to decide behavior when keys are missing or when too many keys are present. Or we can decide not to support keyword expansion, and then that decision will have been documented.

@mark-rushakoff mark-rushakoff transferred this issue from another repository Jan 8, 2019
@russorat russorat added enhancement New feature or request area/core labels Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants