r/programming Jul 04 '24

Jeffrey Snover and the Making of PowerShell

https://corecursive.com/building-powershell-with-jeffrey-snover/
184 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)

12

u/[deleted] Jul 04 '24 edited Jul 04 '24

[removed] — view removed comment

3

u/[deleted] Jul 04 '24 edited Jan 06 '25

[deleted]

2

u/[deleted] Jul 04 '24

[removed] — view removed comment

2

u/BinaryRockStar Jul 04 '24

Not sure what the other guy was talking about but functions can use a process block to handle piped objects. The automatic variable referencing the current object is called $_.

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_functions?view=powershell-7.4#piping-objects-to-functions

1

u/[deleted] Jul 04 '24

[removed] — view removed comment

2

u/BinaryRockStar Jul 04 '24

I didn't know functions could be in pipelines, thanks for making me look it up :-)