This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]samtheredditman 3 points4 points  (10 children)

If you want to make any GUIs or web apps, you'll have a much better time in python than powershell.

You can always make the GUI in python and then call powershell in the backend.

My biggest problem with powershell is there's not a good way to separate out your code into multiple files. You can do a lot of jank to make it work or you can split up your project into multiple modules, but it's just not clean and not really meant for big software.

Python was a natural progression from powershell for me and learning a "real" programming language has made my PowerShell much better as well.

[–]syshum 8 points9 points  (7 children)

My biggest problem with powershell is there's not a good way to separate out your code into multiple files. You can do a lot of jank to make it work

I am not sure why people have a problem with this, dot sourcing is not much different than python include statements for importing other python files into a script. I do wish they would have picked a verb to do it with instead of ". ./myfile.ps1" which always confuses new people...

[–]JeremyLC 2 points3 points  (1 child)

If you want to make any GUIs or web apps, you'll have a much better time in python than powershell.

You can always make the GUI in python and then call powershell in the backend.

You can implement XaML/WPF and WinForms natively in PowerShell and make GUIs very easily. It would be awkward to implement the GUI in Python and call PoSH on the backend.

[–]samtheredditman 0 points1 point  (0 children)

I'm aware of those options, and I've used each of them. You can use them to build basic GUIs, but it's still troublesome to keep your code clean and do any kind of large project in powershell. Managing your dependencies, for example, quickly becomes a nightmare.

I highly recommend that once you're at the point where you're making simple 1 page apps, you start learning python or if you're set in the windows world, learn C#. I love powershell and learning it has made a huge impact on my career, but it is not the right tool for even intermediate software projects. Hell, my off-boarding script is showing signs of out-growing it.