PipeScript icon indicating copy to clipboard operation
PipeScript copied to clipboard

Parameter Templates

Open StartAutomating opened this issue 1 year ago • 0 comments

To a large extent, mapping PowerShell to a given language is about mapping parameters to that language (including PowerShell itself).

If we are accepting the PowerShell parameter as one of the more complete possible forms of a parameter in any given language, then we should be able to template the declaration of the closest possible approximation of a PowerShell parameter in that language.

For example:

function foo {
    param(
    # Help for Bar
    [string]$bar,
    # Help for baz
    [string]$baz
    )
}

Can be easily translated into a method signature in C#, Java, JavaScript, Python, etc. (ideally with metadata intact)

This gets especially appealing when considering two scenarios:

  • UI Languages (HTML, XAML, etc) -- parameters can become user interface input
  • Data Languages (xml,'json,yaml`, etc) -- parameters can become an interface of expected data

Victory for this scenario begins at home, in taking the current plausible options in New-PipeScript and turning them into a template for a single parameter at a time.

  • [ ] #1004

StartAutomating avatar Mar 09 '24 01:03 StartAutomating