Hacker News new | ask | show | jobs
by lenkite 2607 days ago
The concepts around Powershell are good. But the language is a nightmare and simple things like the short-circuit operator are completely broken.
1 comments

If you use aliases then its not nightmare. Use aliases, they are the same as on linux and even better (you can deduce them from the full name by standard).

> short-circuit operator are completely broken.

What do you mean ? This kind of thing ?:

    > 0 -and (Write-Host 2)
    False
    > 1 -and (Write-Host 2)
    2
    False

Not typically used in PowerShell, its bash paradigm IMO. There are objects here, so we throw error objects mostly and combine lines differently.
Unfortunately, outputting the boolean result makes "and" rather useless. See https://github.com/PowerShell/PowerShell/issues/3241