Hacker News new | past | comments | ask | show | jobs | submit login

I've recently been thrust into using PowerShell at work too, and it's fine. I still wouldn't choose it, given the option. I get why people like the object orient nature of it, but I also don't think I get much value from it. 9 times out of 10, if I need a shell script, it's just stringing commands together. If I'm doing something complex enough to really benefit from "everything is and object" then why not just use a more capable language like python?

There is a trend of people making increasingly complex and expressive shell languages, but I don't really understand what problem they are trying to solve. Maybe what we really need is a less complex shell so people are less tempted to write complex logic with it.




> If I'm doing something complex enough to really benefit from "everything is and object" then why not just use a more capable language like python?

I've seen this line of reasoning mentioned a lot but never justified.

A few reasons to stick with Powershell over Python:

Team might not be familiar with Python (and the benefits of learning might be outweighed by the learning curve, shallow as it might be)

Hard to judge what the cutover point is (namely at what point does a script benefit from being written in Python?)

A lot (some?) of stuff out of the box in PS requires libraries in Python, which requires installation, which cannot happen during the script (I think at least, I've not done that much Python)


I did not use powersehll but recently I was using a CLI program that was outputting in a tabular format but it was not something well defined that I could easily (with my very limited shell experience) parse. Maybe it was the program fault that it did not offer some CSV output format or maybe there is a natural way of handeling it but is hard to google for it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: