top | item 47175017

(no title)

stephenr | 3 days ago

POSIX has a manual for shell. You can read 99% of it without needing to know any syscalls. I'm not as familiar with it but Bash has an extensive manual as well, and I doubt syscall knowledge is particularly required there either.

If your complaint is "I don't know what this syntax means without reading the manual" I'd like to point you to any contemporary language that has things like arrow functions, or operator overloading, or magic methods, or monkey patching.

discuss

order

nazgul17|3 days ago

No, the complaint is that "the syntax is not intuitive even knowing the simpler forms of redirection": this one isn't a competition of them, but rather an ad-hoc one.

I know about manuals, and I have known this specific syntax for half of my life.

Arrow functions etc are mechanisms in the language. A template you can build upon. This one is just one special operator. Learn it and use it, but it will serve no other purpose in your brain. It won't make anything easier to understand. It won't help you decipher other code. It won't help you draw connections.

stephenr|3 days ago

> the syntax is not intuitive even knowing the simpler forms of redirection

The MDN page for arrow functions in JS has, I shit you not, 7 variations on the syntax. And your complaint is these are not intuitively similar enough?

call > output

call 2>&1

call > output 2> error

call 1> output 2> error

Give me a fucking break.