I was thinking exactly the same. You can write
if (cond) { cons }
on one line and get more readable code admittedly a few chars longer. if (cond) { cons }
on one line and get more readable code admittedly a few chars longer. if (cond) doSomething();
all the time. if (dontUseCurlies):
goto fail
goto failThe kind of pattern used here with the `||` might seem weird to some JavaScript developers, but it's pretty normal in shell scripts, and it's pretty normal in Ruby with `unless`!
Shell scripts are NOT known for being easy to read. They're full of obscure and sometimes frankly bizarre, arcane syntax that newcomers would have no idea about. Quick, what does "$#" mean? An experienced bash programmer would know, but no one else would. Shell scripts were never meant to be easy to read; they're just an extension of the shell syntax, and of course vary a lot from shell to shell (e.g. bash vs zsh vs ksh etc.).