4 ms·
I hoped you would have asked about LSD use - Bash is such an insane tool with dynamic scoping, horrific array operations, incomprehensible rules for quotes, sim
by stevebmark 5y ago
I hoped you would have asked about LSD use - Bash is such an insane tool with dynamic scoping, horrific array operations, incomprehensible rules for quotes, simultaneously unquestionably useful and one of the most painful programming environments to work in. Acid (big at the time, even bigger than today) must have been involved in the creation of Bash, I'd love to hear more about it.
- kragen 5y agoMost of that stuff is just required compatibility cruft with ksh. I think the array operations were new, maybe, but bash really didn't have a chance to go back and redesign the language from scratch. It had to be able to run existing ksh scripts correctly.
- arp242 5y agoThe problem – as always – has been one of compatibility. The original Bourne shell from the 70s didn't have scoping at all, or functions, or arrays, and ksh added stuff on top of that in ways which maintained compatibility. Changing all of that would be like Python 3, except worse. Bash copied a lot from ksh and zsh (and zsh also copied a lot from ksh), which was a closed "improved Bourne shell" at the time.