PowerShell is quite heavyweight. Aside from the feel of the language and the requirement of .Net runtime, it also makes PowerShell very slow to start up, which is a dealbreaker for interactive usage for me.
Also when I started Elvish 10 years ago (!) PowerShell wasn't ported to non-Windows operating systems yet, so it wasn't even viable for most people.
You are right, even now on my Linux laptop poweshell process takes 100-200ms to start while bash takes 5ms.
But these problems you mentioned are a specifics of a particular implementation, not the approach (objects instead of text processing) itself.
Well, Elvish doesn't have objects, but it's also not based only on text processing - it has lists and maps that can be arbitrarily nested. On this front it is somewhat aligned with PowerShell but without all the OO paradigm.
Unix shells are already a bit LISP-y on a superficial level, because commands are syntactically like impure functions in prefix notation. Subshells act a lot like parens in a LISP, and the pipeline itself has analogs in FP like Clojure's thread macro. And of course, the command line itself is a REPL.
Elvish visibly leans into this to try to have a consistent syntax. Sometimes the similarities go deeper, too; IIRC, its number types are inspired by Scheme, for example.
> Elvish visibly leans into this to try to have a consistent syntax. Sometimes the similarities go deeper, too; IIRC, its number types are inspired by Scheme, for example.
Yes! Similarity to Lisp is very much a deliberate design choice and I feel happy every time a Lisper picks that up :)
I believe Elvish has also contributed a novel solution to the Lisp-1/Lisp-2 divide by making the space of command names equivalent to the subspace of variable names with a suffix - the command "foo" is equivalent to the variable "$foo~" and vice versa. (There's a bit more twist than that - the command "foo" can also resolve to the external command named "foo", but then that's represented by the "$e:foo~" variable.)
Powershell is closer to FP than OOP. What people mean is that it supports structured data.
Powershell is not true FP, but, if you stretch terminology:
- the unit of feature delivery is the function
- you can pass functions as values (but it's not idiomatic or elegant)
- objects tend to look more like anonymous records than OOP classes with methods
- pattern matching is supported (sort of)