Hacker News new | ask | show | jobs
by watersb 1660 days ago
I'm not quite sure if I'm addressing your question; I am not as familiar with PowerShell as I am with various unix-like command shells.

But an example that springs to mind for me is "Get-ChildItem".

Two default aliases for this PowerShell command are `ls` and `dir`.

PowerShell seems to build upon data structures, can pass these around much in the same way that is done in the REPL of an interpreter.

Unix shells lean on the file system for that: if you want to "really" pass around data structures, you pass the name of associated file handles, as defined in the namespace of the virtual file system (VFS).

It turn out that the unix way is usually quite sufficient for interactive sessions. Remarkably so.

But I can write PowerShell functions that do type checking. I can sign PowerShell files with a certificate that implements a security policy...

Stuff like that can be done by a Unix shell and VFS in 2021, but the complexity trade-offs start to favor programming environments with a typed call stack.