4 ms·
You should : even if I consider Powershell pretty alien as a language (coming from an old time Windows dev), Cmdlet is vastly superior to other various argument
by luch 9y ago
You should : even if I consider Powershell pretty alien as a language (coming from an old time Windows dev), Cmdlet is vastly superior to other various argument parsing tooling (optparse, argparse, argv, etc.) I've used in the past.
- ZenoArrow 9y ago> "Cmdlet is vastly superior to other various argument parsing tooling (optparse, argparse, argv, etc.) I've used in the past." I can't comment on the other options you listed, but I would agree that PowerShell has good features for parsing arguments (if you use advanced cmdlets, which only require one extra line to enable on basic cmdlet code, for [CmdletBinding()] ). Aside from built-in attributes for enabling common argument checks (like checking for nulls), you can completely customise parameter validation using ValidateScript, which allows you to set up a script that must evaluate as true in order for an argument to be valid. I'd be interested to find out if any Unix command line scripting language offers something similar.