Title: Proposal for inline splatting · Issue #25029 · PowerShell/PowerShell · GitHub
Open Graph Title: Proposal for inline splatting · Issue #25029 · PowerShell/PowerShell
X Title: Proposal for inline splatting · Issue #25029 · PowerShell/PowerShell
Description: Summary of the new feature / enhancement Sometimes I just declare a temp variable used for nothing else other than for splatting a function call: $p = @{a=1;b=2;c=3} Some-Func -AdditionalParam 4 @p -AnotherParam 5 However, I do this as a...
Open Graph Description: Summary of the new feature / enhancement Sometimes I just declare a temp variable used for nothing else other than for splatting a function call: $p = @{a=1;b=2;c=3} Some-Func -AdditionalParam 4 @p...
X Description: Summary of the new feature / enhancement Sometimes I just declare a temp variable used for nothing else other than for splatting a function call: $p = @{a=1;b=2;c=3} Some-Func -AdditionalParam 4 @p...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/25029
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Proposal for inline splatting","articleBody":"### Summary of the new feature / enhancement\n\nSometimes I just declare a temp variable used for nothing else other than for splatting a function call:\n\n```pwsh\n$p = @{a=1;b=2;c=3}\nSome-Func -AdditionalParam 4 @p -AnotherParam 5\n```\n\nHowever, I do this as a means of dealing with the fact that PowerShell does not have a way to do inline splatting.\n\nI propose the following syntax:\n\n```pwsh\nSome-Func @:@{a=2;b=2;c=3} # Functions\n\u0026 \"somescript.ps1\" @:@{d=4;e=5;f=6} # Script files\n\u0026 $someScriptBlock @:@{g=7;h=8;i=9} # Script blocks\n\u0026 $somePSObject.SomeScriptMethod.Script @:@(1,2,3,4,5) # Script methods\n```\n\n### Proposed technical implementation details (optional)\n\n_No response_","author":{"url":"https://github.com/anonhostpi","@type":"Person","name":"anonhostpi"},"datePublished":"2025-02-15T21:01:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/25029/PowerShell/issues/25029"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:52092731-8224-fecf-9d41-4ccd7835d8d3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C4F8:1A518F:DDD6D:133615:6A583C71 |
| html-safe-nonce | 83fb31b9385e43cdf91bf8035e9ffe7f534f3c9b9f7d5ed91c4c0de2695e56d7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNEY4OjFBNTE4RjpEREQ2RDoxMzM2MTU6NkE1ODNDNzEiLCJ2aXNpdG9yX2lkIjoiNTA2MjgwNTgwNTYxMjk0MDQwMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a6522a24512a9b8d8a77d9a5c50fa5545961515de8320e83f0a7e334ebcaf1f6 |
| hovercard-subject-tag | issue:2855713747 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/25029/issue_layout |
| twitter:image | https://opengraph.githubassets.com/08ace1e9fed0189503a50038865d5e14c17362efa170e00777eeafd90435c00c/PowerShell/PowerShell/issues/25029 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/08ace1e9fed0189503a50038865d5e14c17362efa170e00777eeafd90435c00c/PowerShell/PowerShell/issues/25029 |
| og:image:alt | Summary of the new feature / enhancement Sometimes I just declare a temp variable used for nothing else other than for splatting a function call: $p = @{a=1;b=2;c=3} Some-Func -AdditionalParam 4 @p... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | anonhostpi |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f2a0c7865178af3d91dd9f13b0cdfc3c73a2529c873d2780bb4c01271a57ec6 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7d699f0c51c1f58938601870a21967b74eaad94d |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width