Skip to content

PipeScript should support dotting  #107

@StartAutomating

Description

@StartAutomating

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" |.Length

Compared to:

"a","b","c" | Select-Object -ExpandProperty Length

Where things can get more interesting is in having multiple properties chained within an expression.

$x, $y = $bitmap | .Width.Height

Ideally, dotting should include a minimum amount of code to perform multiple operations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions