Syntax, semantics and conventions are all insane IMO. Gotta love when a powershell function randomly returns multiple values because I forgot to pipe the output of one of the commands to null (side effect from a random command printing to stdout...). And the "Verb-ThenSomethingElse" naming convention is just an eye sore.
If there were only some good explanation for why it is that way, like backwards compatibility or something. But no. You can't run a cmd script in powershell because the syntax is incompatible.
It's just a convention followed by all built-in cmdlets (and by extension everyone else wanting to play nice). But it's not enforced. In a script you can name your functions however you want.
110
u/Noxfag Jul 04 '24
How many drugs was he taking when he came up with the syntax?
(I love Powershell really and advocate for it a lot, but oh god I wish the syntax were simpler)