Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> the design of Unix shell is bonkers

Compared to what?



Powershell?


PowerShell designer could learn from decades of programming language progress and especially shell usage. They could improve many aspects indeed. This doesn't mean that the original design is "bonkers", only that it's not perfect.


The way Powershell works is largely based on what the computing world was doing with shells outside Bell Labs, at IBM, Xerox, and others places, exactly at similar timeframe as UNIX was happening.


Can you give examples of what should be improved in PowerShell?


Verbosity is a huge problem there


Modern programming language designers have a bad relationship with verbosity. I don't know why they do this.

It's a lang for an interactive shell, typing literally translates to developer speed. I understand the want for clarity and maybe that's nice in large scripts, but the main goal is to be a shell. So, optimize for that. Also, you probably shouldn't be using powershell for large scripts anyway.

The only recent lang I've seen that has a handle on this is Rust. You can tell they put a lot of thought into having keywords be as short as possible while still being descriptive.


FoundTheCamelCaseConvert.

My God next you will say getopt() --longform is the bestest


It's been years since I used Powershell, but IIRC there are shortcuts for the common commands, e.g. cat, ls, mv, rm, and such DTRT.


Those aliases are, I believe, only defined on Windows PowerShell (the closed-source version 5; not PowerShell 7). I wish those default aliases you mentioned weren’t a thing. Especially `curl` (people should use `iwr` instead), which is an alias of `Invoke-WebRequest`, because it makes the `curl.exe` shipped with Windows nearly undiscoverable.




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

Search: