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

[Blocked on PowerShell feature PR 10073] Add support for generalized inline splatting #188

Open
bergmeister opened this issue Oct 28, 2019 · 2 comments

Comments

@bergmeister
Copy link

This is a tracking issue to add support for the @@ inline splatting syntax as part of the wider generalized splatting syntax.
Pending merge of this PR: PowerShell/PowerShell#10073

@omniomi
Copy link
Collaborator

omniomi commented Oct 28, 2019

I pinged you on Slack but what would you call the first @ in that instance do you think? When calling a typical splat the @ uses the same colour as a $ as if you were calling a variable. Should it just double down on that or should it colour/scope the first @ as if it was the - in a parameter? Or something else?

@bergmeister
Copy link
Author

bergmeister commented Oct 28, 2019

The idea of generalized splatting in the future (if someone implements it) is that @ is to be treated as an unary operator that gets applied to something (which could be a hashtable or variable storing it directly). In the future there might even be optional whitespace between 2 @s. But for the moment I would not worry about anything that has not been implemented yet. The PR is only going to add syntax of the following shape where the parameters hashtable is inlined with the additional @ to distinguish from an hashtable argument:

Get-Foo @@{ Param1 = $param1Value }

I would make both @ symbols have the same colour if you do the same for the @$ already or if you intend to change that, I'd keep them consistent.
And before the PR isn't merged, I would not start any work, if this PR does not get merged in the next month, then I suspect it might take longer to get merged than having a baby (because it would've missed the deadline to get new features into v7).

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

2 participants