Hacker News new | ask | show | jobs
by AckSyn 3709 days ago
Slackware jumped from Version 4 to 7 back in 1999.

Anyways, Powershell is pretty amazing and they did get it right. However, some of the syntax leaves much to be desired. I mean this:

Get-ChildItem $Path | Where {$_.extension -eq '.DLL'}

It's the worst example of a recursive search for a specific file extension, easiest being "gci -Recurse -Include .DLL", but the syntax using {$_. ,'*'} is used in many places, most of which I've been able to figure out less complicated replacements and achieve the same results. This includes being able to pipe out each "object" in the resulting text appropriately.

This isn't a bash against powershell. They did get it right, but I'm left wondering why they bothered including this kind of syntax'ing?