3 ms·
I think there's stuff that could definitely be an improvement. One that I take issue with is the "everything is a string" mentality of bash. It makes working
by curryst 5y ago
I think there's stuff that could definitely be an improvement.
One that I take issue with is the "everything is a string" mentality of bash. It makes working with structured data harder than necessary, and a ton of stuff I do with my shell involves structured data like JSON. A sane array and hashmap implementation would be nice.
Another thing, which I picked up from elvish, is the concept of separating the textual output of a function from the value it returns. Bash lacks that distinction; the textual output is the value, which makes it annoying to do things like log from a function but also return a value.
I really like Elvish. It's similar enough to bash that I don't feel like the floor has been pulled out from under me, but it makes it dead simple to do something like pull data from a REST API without me having to pull out Python.
The other big pattern I've seen is object-oriented shells like Powershell and Nushell. They seem neat, but too complicated for me to manage in my head while trying to get stuff done. They're a little further towards "programming lanugage" on the range of shell to programming language.