Title: PowerShell should support creating an List similar to how it supports arrays · Issue #5643 · PowerShell/PowerShell · GitHub
Open Graph Title: PowerShell should support creating an List similar to how it supports arrays · Issue #5643 · PowerShell/PowerShell
X Title: PowerShell should support creating an List similar to how it supports arrays · Issue #5643 · PowerShell/PowerShell
Description: Powershell supports creating arrays with $array = 'a', 1, '3' . Then you can add an element to the array with $array += 4, but this creates a new array which is not performant. Powershell should have a syntax which allows creating lists....
Open Graph Description: Powershell supports creating arrays with $array = 'a', 1, '3' . Then you can add an element to the array with $array += 4, but this creates a new array which is not performant. Powershell should ha...
X Description: Powershell supports creating arrays with $array = 'a', 1, '3' . Then you can add an element to the array with $array += 4, but this creates a new array which is not performant. Powe...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/5643
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PowerShell should support creating an List similar to how it supports arrays","articleBody":"Powershell supports creating arrays with `$array = 'a', 1, '3'` . Then you can add an element to the array with `$array += 4`, but this creates a new array which is not performant.\r\n\r\nPowershell should have a syntax which allows creating lists.\r\nAssuming the operator is `@[...]`, you could create a list with `$list = @['a', 1, '3']` and then you could add an element to the existing list with `$list += 4` without PowerShell having to create a new list.\r\nNote: this new operator might function more like `@(...)`\r\n\r\nThis design assumes that changing `,` would be a breaking change. I'm open to discussing changing `,` as well.\r\n\r\nI filed this based on an offline discussion about this comment on a PR: https://github.com/PowerShell/PowerShell/pull/5625#discussion_r155106230 ","author":{"url":"https://github.com/TravisEz13","@type":"Person","name":"TravisEz13"},"datePublished":"2017-12-06T23:10:17.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":68},"url":"https://github.com/5643/PowerShell/issues/5643"}
| 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:bdcb2294-f1ce-663e-66fa-ad61c1c9f270 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CDD6:2934DF:1178898:193A1D4:6A58B84F |
| html-safe-nonce | b1744bb36532dbfe1fc02ae5c5f42457c5b8c813030af28f0aae73711c592594 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDREQ2OjI5MzRERjoxMTc4ODk4OjE5M0ExRDQ6NkE1OEI4NEYiLCJ2aXNpdG9yX2lkIjoiODc4NTU0ODUwOTkxMzMzMTc5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ac517de1be4ce7b7be5806a7b15101e7a91c3e6e3c15d7402096c5e535324121 |
| hovercard-subject-tag | issue:279940724 |
| 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/5643/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d01edd40c7c74646cd0f9696cbe08e62d66074e2368c8b8d89321c3df3d54195/PowerShell/PowerShell/issues/5643 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d01edd40c7c74646cd0f9696cbe08e62d66074e2368c8b8d89321c3df3d54195/PowerShell/PowerShell/issues/5643 |
| og:image:alt | Powershell supports creating arrays with $array = 'a', 1, '3' . Then you can add an element to the array with $array += 4, but this creates a new array which is not performant. Powershell should ha... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | TravisEz13 |
| 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 | 8aae7b8d6caacacf5c66eaeb2702d8dc88d85b4a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width