Skip to content

Inline Splatting Meta Issue #25721

Open
Open

Description

There are a lot of different issues regarding inline splatting, creating an issue to centralize them and the related RFCs

RFCs

jborean93/PowerShell-RFC#1

Issues

#25029
#25574

Activity

  1. anonhostpi commented on Jul 2, 2025

    @anonhostpi

    BEFORE we get into any disagreements:

    I'm gonna say it once more (to prevent the exact same conversation that kicked off in the RFC):

    I think that we would all be happy if there was anyway to inline splat than no way at all...

  2. iRon7 commented on Jul 4, 2025

    @iRon7
  3. anonhostpi commented on Jul 5, 2025

    @anonhostpi

    Inline as defined by Merriam-Webster's dictionary is a word on its own:

    having the parts or units arranged in a straight line

    Inline and line are contextual terms in IT and CS (much like host is).

    Even in this case, a line has 2 meanings: a line of text as displayed in the terminal (subject to overflow), and a line as read by the powershell engine when executing statements (terminated by one of powershell's line terminators: \r?\n, ; or })

    It's only confusing, if you have ever used the term in one context.

    Consider the following:

    In most programming languages, this type of statement is considered in-line as the entire thing is evaluated as a singular unit terminated by that language's line endings:

    $value = (& {
        "Despite this scriptblock taking multiple lines of space,"
        "it is all contained within the wrapping parenthesis,"
        "and terminated by the following colon"
    }); # <- the actual line-terminator as interpreted by PowerShell

    or in javascript, the IIFE pattern:

    var value = (() => {
        return [
            "Despite this function taking multiple lines of space,",
            "it is all contained within the wrapping parenthesis,",
            "and terminated by that last colon"
        ];
    })(); // <- the actual line-terminator as interpreted by JS

    The engine may see IIFE-esque patterns as multiple lines, but the entire encapsulating statement is evaluated as a single line

  4. jborean93 commented on Aug 5, 2025

    @jborean93
    Collaborator

    I've opened an official RFC with the -@ splat parameter approach PowerShell/PowerShell-RFC#397. I've set a request for comments by 2025-09-30 so hopefully we can get some feedback from the WG around the proposed approach.

    I've also created a POC PR for people to play around with and validate that the proposed approach is doable in PowerShell #25821.

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

    Issue-Enhancementthe issue is more of a feature request than a bugNeeds-TriageThe issue is new and needs to be triaged by a work group.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions