3 ms·
PowerShell is terrible. The idea is good, the implementation bad
by bossyTeacher 2y ago
PowerShell is terrible. The idea is good, the implementation bad
- Someone1234 2y agoCare to go into any detail at all..?
- orthoxerox 2y agoIt has a very idiosyncratic syntax. The internals are great, but it's so unlike either sh or C that I, for example, just can't be bothered to remember it.
- bossyTeacher 2y agoIn most normal languages, a non-void function returns either null or some data. Normally, the type of data is always the same. So your function returning a string will never return an int. Either it returns a string or an int. In PowerShell this is not guaranteed for all the functions in packages supported by Microsoft. A function returning a list of strings, can sometimes return a list of something that are not strings. This is the first big issue I have with PowerShell. The language is very quirky. Simple stuff like using variables is not as intuitive as it should be. Another issue is encapsulation of logic, it is not straightforward at all. This is my second big issue. Trying to temporarily disable script policies to run a script is not straightforward either.
- 7bit 2y agoSkill issue, git gud
- levidos 2y agoPowerShell is amazing
- ravenstine 2y agoI always wondered why Microsoft didn't just clone something like Bash as close as possible. Powershell was different enough from UNIX that I couldn't get myself interested in it during my phase when I was using both Windows and Linux.
- ygra 2y agoJeffrey Snover once answered this on Stack Overflow. The answer is that bash and all the other Unix tools wouldn't help you very much on an operating system where things are accessible via an API and not via text files and command-line programs. That's why PowerShell also has "drives" for things like the registry and the certificate store. Even functions, aliases, environment variables and PowerShell variables get their own drive, funnily enough.
- 7bit 2y agoBecause these people didn't want another relict that only does text manipulation. If you love awk and sed, you can use Bash. If you like to work with real objects, use PowerShell...