zlacker

[return to "The Case for Nushell (2023)"]
1. wpm+XC[view] [source] 2026-01-07 18:37:53
>>raveni+(OP)
Is

for i in 1..10 {

    print $i
}

really all that more readable than

for i in {1..10}; do

    print $i
done

Like, am I taking crazy pills? They're basically exactly the same!

◧◩
2. kalter+gK[view] [source] 2026-01-07 19:09:26
>>wpm+XC
Bash is an advanced beast. In Bourne, it was

    for i in `seq 10`
    do
        print $i
    done
Which is pretty much readable though. The only issue is Pascal vs C syntax. As a fan of the former, I admit that the latter is more advanced: it stacks better. E.g. consider

    if (test -f junk) rm junk
against

    if test -f junk; then rm junk; fi
The former “avoids semicolons that Bourne requires in odd places, and the syntax characters better set off the active parts of the command.” [1]

1: Rc—The Plan 9 Shell https://9p.io/sys/doc/rc.html

[go to top]