Hacker News new | ask | show | jobs
by entire-name 2095 days ago
As the saying goes, code is typically written once and read thousands of times. It takes you less than a second to write the full flag name (add a few seconds if you need to look it up), but it will likely save at least a few hundred readings the time to look up the flag if they do not already know it. In addition, full flag names contributes "self-documentation" in many cases, and also potentially makes searching easier in certain cases.
1 comments

You're assuming the long version is more well known than the short version. That's a wildly and provably false assumption.

Do you know, without referring to the manpage, exactly what `cp --no-dereference --preserve=links --recursive --preserve=all` does? I don't. I can take some guesses based on the names of the options, but those guesses could very easily miss an important corner case.

Do you know what `cp -a` does? I do.

The long form of `-a` would be `--archive`, for the same reason that you write `-a` and not `-dR --preserve=all`
I'm afraid that doesn't fit with the "be as explicit as you can regardless of logic" espoused in the article.