3 ms·
Agreed. It's interesting - last time I looked at PowerShell it seemed insanely verbose, but maybe I was looking at some odd examples.
by untog 11y ago
Agreed. It's interesting - last time I looked at PowerShell it seemed insanely verbose, but maybe I was looking at some odd examples.
- hobs 11y agoOh, it can be. The confusion lies around the fact that you can do basic things half a dozen ways, and I also used some shorter aliases (eg Get-ChildItem (or gci, or ls) Sort-Object (sort) Select-Object (select)) You can sort of choose what level of verbosity you want to encode in your scripts for your sanity at a later date.
- WorldMaker 11y agoAs pointed out a lot of the verbosity in PowerShell is optional these days as there are a good number of aliases for common commands. The nice thing about the verbosity is kind of similar to the point of SQL in that it too has something of a natural language DSL intent (in PowerShell commands are expected to be "Verb-Noun" and verbs for the most part are encouraged to be from a relatively small set of common verbs). This can make it a bear to fully write out without an IDE (and there are multiple choices these days) or tab completion (which gets better with each release). The benefit however, is that typically you can very easily read someone's PS1 script if it has been written at full verbosity and know what it is doing. It's often very close to self-documenting at that point.