-
-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Description
One of the things that PowerShell's object pipeline can do, but its syntax doesn't do elegantly, is invoking a method or returning one or more properties.
PipeScript should innovate here by robustly supporting the dot operator.
For example:
'a','ba','ca'|.IndexOf('a')Compared to:
'a','ba','ca'| Foreach-Object{ $_.IndexOf("a") }
# or
foreach ($val in 'a','ba','ca') { $val.IndexOf("a"} }of even:
"a","b","c" |.LengthCompared to:
"a","b","c" | Select-Object -ExpandProperty LengthWhere things can get more interesting is in having multiple properties chained within an expression.
$x, $y = $bitmap | .Width.HeightIdeally, dotting should include a minimum amount of code to perform multiple operations.
Metadata
Metadata
Assignees
Labels
No labels