3 ms·
Of all the things you could have chosen, you picked the most trivial? I hate loops and logic in bash because you need to always do things like this: for i in
by cyphar 11y ago
Of all the things you could have chosen, you picked the most trivial? I hate loops and logic in bash because you need to always do things like this:
for i in {1..20}
do
echo $i
done
What is the purpose of having the `do` and `done`? And with if statements, what's the purpose of having `then` and `fi`? Curly braces fix that issue and are much easier to read. Not to mention that literally every single real editor has a plugin for making sure your braces always match up.
I think `else if` to `elif` would be a much better change to fix people who write `else <newline> if` and other things that make it hard to read code. However, it should be noted that you couldn't do some pretty horrible macro hacks that way (but maybe if you made the no-brackets format of blocks no longer valid, then that problem would be fixed).
Not to mention that `end <block>` is syntactic clutter. We all know what block it must terminate -- that's why brackets work.