You should take a look at C's manpage getopt_long(3). The use of shell aliasing for the default options is very common on the modern Linux boxes. Most Linux distributions shipped with default shell aliasing, and most your so-called "primitive users" won't even notice that. When you type "cp" it is really expended to "cp -i". Some way to disable that behavior is absolutely required. Users need a way to override the systems' default or her/his own default. They are not required to know the detail of shell aliasing. They just want to set the options they needed and see the result. This is not the programmers' view. It's the users' view.
I have read your why_order_matters.txt. Yes, users can backspace and remove the -vvv. But from my experience moving cursor to a specific position is no easy thing on slow, remote machines. Adding --no-v at the tail can save my life. And what if that command is in fact aliased? Do I have to unalasing first before lowering down the verbose level? Are you intended to tell this "unaliasing first" to your so-called "primitive users"? If there are applications equipped with that Getopt::Modern, I would avoid using them since I have to "unalias first" in order to override the default. I would not suggest my users to use them, too, since I have to teach them to "unalias first". That "unalias first" is definitly not the users' view. I know some shells don't have aliasing, like command.com, cmd.exe or explorer.exe on MS-Win32 boxes. The MS-Win32 distributor won't ship any default options by aliasing at all. Are the users on MS-Win32 boxes what you mean here? But even on those shells when I wrote a cp.bat to replace cp.exe to set my default arguments, I still need a way to override my own default. Of course I can still parse the arguments of cp.bat myself and remove -vvv from the default. But if I have to do so, what do I need Getopt::Modern for? Not allowing overriding the default is the system administrators' view, or the programmers' view, but definitely not the users' view. Not personal, but this is the only clear point in all the problems you mentioned against Getopt::Long. Other points stated in your slide are ambiguous. On Thu, 16 Jun 2005 15:07:40 -0700 Eric Wilhelm <[EMAIL PROTECTED]> wrote: > # The following was supposedly scribed by > # Lee Eakin > # on Thursday 16 June 2005 02:59 pm: > > >Order is significant because of the shell. ?f you commonly use a > >program with option --foo, then you often decide to make an alias for > >the program that includes that option. ?f order is significant, then > >you can call the alias and add the --no-foo option to get a different > >effect without have to go around your shell alias. > > Ok. Here's one edge-case which probably involves somebody smart enough > to not get stuck in it. Is this really a good argument for perplexing > the user the other 99% of the time? > > Furthermore, would --de-foo not satisfy this (occasional) need? > > --Eric > -- > "Everything goes wrong all at once." > -- Quantized Revision of Murphy's Law > --------------------------------------------- > http://scratchcomputing.com > --------------------------------------------- -- Best regards, imacat ^_*' <[EMAIL PROTECTED]> PGP Key: http://www.imacat.idv.tw/me/pgpkey.txt <<Woman's Voice>> News: http://www.wov.idv.tw/ Tavern IMACAT's: http://www.imacat.idv.tw/ TLUG List Manager: http://www.linux.org.tw/mailman/listinfo/tlug
pgp3ptCTTsFBE.pgp
Description: PGP signature