From: Eric B. <gob...@if...> - 2002-09-27 09:09:23
|
Andreas Leitner wrote: > > My main argument is that you have a simpler/more consistent syntax if > you choose to allow only long options to have values. This makes life > easier for the parser (though this is not really important, because the > user is of more importance). Exactly, we don't care how hard it is for the parser. Furthermore, I disagree with Andreas for the following reason: it's not up to the library designer to decide what kind of command-line options the users of this library should use for their programs. If the users want to use short options with values, that's their choice. If it's not possible to do that with this library, they will use another library which allows them to do that (at least I would). It's as if you were designing a graphical library, and you decided that using push button in a GUI was not very intuitive for the users of such GUI, so you decided not to support push buttons in your graphical library. OK, this is an extreme example, but it's to show you that the goal of the library is to provide services, not to restrict some usages of the domain of application. Here the domain of application is command-line, and there are many programs (including some of the Gobo tools) using short option names followed by values. The goal a command-line parsing library should not to force people change their habit but to allow them to do what they want to do. Then is up to the project or company guidelines to decide whether they should use short options with values or not based on your following remark: > For user, what happens is that he has an > easier time learning that 'Long options may have values, short options > never have values', instead of 'Long options may have values, short > options may only have values if they require them'. This is more > difficult because of the second if, and also requires the user to know > if a given option requires a value or only allows a value. -- Eric Bezault mailto:er...@go... http://www.gobosoft.com ________________________________________________________________ Etudiant: Wanadoo t'offre le Pack eXtense Haut Débit soit 150,92 euros d'économies ! Et pour 1 euro de plus, reçois le CD-ROM du jeu Dark Age of Camelot + 1 mois de jeu en réseau offert ! Clique ici : http://www.ifrance.com/_reloc/mail.etudiant |