4 ms·
The advantages of bash are almost all related to it NOT being a "real" programming language. The terseness, ease of writing self-modifying code and anonymous fu
by t-3 5y ago
The advantages of bash are almost all related to it NOT being a "real" programming language. The terseness, ease of writing self-modifying code and anonymous functions, lack of typing, flexible syntax, easy interoperability with any other language and program through any available interface, are not really desirable for writing stable and maintainable code. They are hugely desirable for quickly hacking something together, testing and learning, and the numerous simple scripting tasks involved in system administration.
- kaba0 5y agoBut it is so full of landmines that even those quick dirty hacks will fail. Also, don’t even start me up on self-modifying code, we have one at a work project and it sometimes just fails and results in inserting the same echo statement at each run, resulting in every bootstrap displaying 2^n messages, depending on when have I last cleaned it up…
- throwawaygh 5y ago> They are hugely desirable for quickly hacking something together Undeniably, yes. I was there in the 90s ;-) But hacking things together in a way that's robust is difficult, and bash isn't a good match for that difficulty. These days I mostly operate in the realm of "how can I enable others to hack things together without blowing tens of millions of our dollars and their very early career on a stupid mistake".