7 ms·
I'm glad that this package exists. I know of UNIX parameters, with a single hyphen & a single letter, and GNU parameters, with a double parameter and a word. B
by dotemacs 1y ago
I'm glad that this package exists.
I know of UNIX parameters, with a single hyphen & a single letter, and GNU parameters, with a double parameter and a word. But a single hyphen and then a word: *mind broken*.
When I first saw that on Terraform, I was upset & conflicted.
OK, I know that Java also has mental parameter options like that ('-version', note the *single* hyphen followed by, gasp, a word!), but I just dismissed it as weird enterprise-ism.
Then I saw that this 'single hyphen + word' was an accepted convention for parameters, in the Go world & I was disappointed.
Glad that this package is fighting the good fight.
- PhilipRoman 1y ago`find` is also notorious for its parameter style. But in my opinion programmers sometimes put too much importance on following conventions. You're not gonna go blind from looking at an incorrectly indented line. If the founding fathers of unix didn't want us creating horrifying monstrosities, they shouldn't have given us unlimited access to argv :)
- bqmjjx0kac 1y agoFun fact, `find`'s wonky argument syntax predates GNU syntax. It was part of Version 5 Unix from 1974. https://en.wikipedia.org/wiki/Find_(Unix) https://en.wikipedia.org/wiki/Find_(Unix)
- orthoxerox 1y agoAs was `dd`, another program with an unorthodox syntax.
- petepete 1y agoI used find frequently for more than a decade and it just never felt natural to me. I get there in the end but have to stop and think. With fd, a modern 'equivalent', I barely think just type. Same for grep.
- darrenf 1y ago> OK, I know that Java also has mental parameter options like that ('-version', note the *single* hyphen followed by, gasp, a word!), but I just dismissed it as weird enterprise-ism. I think "mental" is being too kind about java. $ java -version and $ java --version both work, their outputs are different, and `-version` goes to STDERR whereas `--version` goes to STDOUT.
- deleted 1y ago[deleted]