Re:A language that compiles to Bash and Windows Batch
by wvenable on Thursday May 19, 2016 @06:24PM
(#11734349)
PowerShell took everything that was great about .NET and combined it with everything that was terrible about Bash. So we have, yet again, a difficult to understand language for shell scripting.
[ Parent
| on HN ]
Re:A language that compiles to Bash and Windows Batch
by colejohnson66 on Thursday May 19, 2016 @07:49PM
(#11734752)
Why is it bad? I've been able to write some pretty great PS scripts to automate tasks. It's easier than firing up Visual Studio and writing a C# program I'd need to recompile if I ever want to change it.
Re:A language that compiles to Bash and Windows Batch
by wvenable on Friday May 20, 2016 @11:37AM
(#11738682)
It's very powerful but the syntax is step back 20 years:
If ($Number -gt 0)
That's just one example. There is a lot of really confusing stuff in powershell that's entirely unnecessary. There were going for some kind of Bash-shell familiarity which, oddly enough, most Windows developers don't even have.
Re:A language that compiles to Bash and Windows Batch
by colejohnson66 on Friday May 20, 2016 @06:31PM
(#11742055)
I'd say the usage of -lt and the like is because angle brackets are used for piping data.
Re:A language that compiles to Bash and Windows Batch
by wvenable on Friday May 20, 2016 @06:54PM
(#11742185)
The shell is a mess of symbols making any sane programming language impossible. Instead of perhaps rethinking the "mess of symbols" issue they ruined the language instead.
Re:A language that compiles to Bash and Windows Batch
by smoothdeveloper on Friday May 20, 2016 @03:29AM
(#11736070)
Have you considered F#? Works well for scripting.