tried my hand at more intense shell scripting and WOW i had a terrible time. why is the distinction between $foo and "$foo" important. why can't i just create a scoped block so my shell setup scripts don't leak variables all over my interactive shell. why do we have [ ] and also [[ ]]. what on god's green flat earth is "${#array[@]}". did array.length kill your parents or something. why does printf %f apple/banana cause a division by zero error. i mean i know why but why does it silently do something very wrong instead of erroring out earlier. why do i have to manually specify that using undefined variables is an error. on that note, i get why setopt -e is a thing, but why is there no way to mark a command as "i know this can fail that's why i wrote maybe_result=bar please just let me retrieve the non-zero exit code instead of closing my whole script for me thank you". i get that color's not that important in the grand scheme of things but printf "\033[31m%s\033[0m" "blah blah blah" gets real old real quick. it's hella verbose but at least i can read <span style="color: red;">this</span> without having to scan left and right over and over. much has been said about whitespace sensitivity but dear gods why is the whitespace in my strings significant.
shellcheck (in vscode/vscodium) saved my fuzzy gray ass many times but often only raised more questions. and it sure as hell didn't save me from subshell surprises (though perhaps no such tooling really can in a general sense).
maybe i need to be looking into more / better python tooling. if python has good static typing these days i might just pick that in the future for my scripts.
