3 ms·
A secondary benefit not mentioned in the article is immutability. Long flags on a command line utility should never change. Short flags may be modified betwee
by nathanstitt 14y ago
A secondary benefit not mentioned in the article is immutability.
Long flags on a command line utility should never change. Short flags may be modified between major versions of a utility, which would break scripts.
Of course this is just a convention, and I'm sure it's not followed 100%. I'll take whatever protection I can get though.
- Flimm 14y agoNeither long flags or short flags should change meaning. I'm not sure where you got the idea that short flags do.
- nathanstitt 14y agoYou now, I'm really not sure where I picked that up. It's always been my understanding that it was acceptable to change the short flags on a utility as part of a new major version. Not that you should change 'em capriciously, but that it wasn't the end of the world if you did. Of course, I can't find any references to back me up on that, so you may very well be correct.
- zxtang 14y ago"GNU grep 2.12 changes behavior of recursion options, breaks existing scripts": http://news.ycombinator.com/item?id=4295681 http://news.ycombinator.com/item?id=4295681