Skip to content

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

Open

Description

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

Activity

  1. omniomi commented on Oct 28, 2019

    @omniomi
    Contributor

    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?

  2. bergmeister commented on Oct 28, 2019

    @bergmeister
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions