Give me a programming language and I'll rate it

@aescling Hmm...

Shell-scripting 3.75/5:
+ Very useful, I've written quite some shell scripts
+ Pipe all the useful UNIX programs into each other
- The handling of whitespaces in a variable is annoying
- I keep having to call out to awk or sed to do more advanced string processing (but that might be a skill issue?)

Bash specifically: I'm not educated enough about all the differences to give a good rating, but
+ Some of the extra features (e.g. more parameter expansions, arrays, etc.) are very convenient
- A lot of older systems don't have Bash installed by default, though you often can compile it

@aescling I'm very curious about your own ratings, it seems that Bash vs. POSIX shell is something that you've opinions about

@vaporeon_ i’ve developed distaste fur bash features (to be clear, specificallyin shell scripts, not when using it as an interactive language) out of a long-held purrefurence fur writing as compatibly as i am able. so this biases my opinions;.i don’t actually know bash well enough that i feel like i could rate it fairly

i think the shell is very good at what it is designed to do. i adore it. i do think that actually writing scripts in it is usually pushing it beyond its capabilities unless the scripts are small. (but it’s GREAT at writing small scripts that are really useful!) i don’t think bash’s extra features sufficiently make up fur the shell’s deficicies at handling large scripts well so if i really wanted to use a bash feature in my script i would start considering whether i should use another language instead

the footguns are annoying as hell though, i’ve definitely exploded on weird subtle semantic things i furgot about more than once

@aescling Tell me about the deficiencies at handling large scripts?

Follow

@vaporeon_ no local variables* (one of bash’s real impurrovements to the language. dash targets POSIX but also has local variables anyway because they’re just so nice to have); very limited data types (bash having actual arrays is another big impurrovement). variable scope has all sorts of weird footguns (implicit subshells can cause really unexpected behavior; iirc for loops can really trip you up here). variable expansions being word split by default is the wrong default and annoying to have to purrotect your code from

* i know you can define block-scoped variables but i don’t entirely understand how it works

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.