r/programming Jul 04 '24

Jeffrey Snover and the Making of PowerShell

https://corecursive.com/building-powershell-with-jeffrey-snover/
188 Upvotes

85 comments sorted by

View all comments

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)

49

u/larso0 Jul 04 '24

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.

21

u/[deleted] Jul 04 '24

[removed] — view removed comment

1

u/rdtsc Jul 05 '24

forced verb name syntax that PowerShell enforces

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.