Re: ANN: OP Command Line Parser 0.9.1

Eric Bezault <ericb-D6Qt/9opevxWk0Htik3J/[email protected]>
Newsgroups gmane.comp.lang.eiffel.gobo.general
Organization Gobo
Message-ID <[email protected]>
Bernd Schoeller wrote:
> On Fri, Mar 24, 2006 at 07:12:18PM +1200, Berend de Boer wrote:
> 
>>>This is the first release of the library and feedback is very
>>>welcome.
>>
>>Great, exactly what I need. Except for one thing to make it really
>>user-friendly :-)
>>
>>A way to describe the options with XML, plus a corresponding grammar
>>in Relax NG, and style sheet to create the code.
>>
>>The XML sort of looks like this:
>>
>><options>
>>  <mode type="gnu"/>
>>  <option short="h" long="help" is-help="true"/>
>>  <option short="f" long="filename" type="string" required="true"/>
>>  <option short="d" long="depth" type="integer"/>
>></options>
> 
> 
> You are touching a sensitive point here, a discussion that I have
> already had with Andreas Leitner: He also favors a full-fledged XML
> configuration file that describes all the different details of the
> options and then generates classes for parsing the command line (he
> also thinks that the command line should be specified as a regular
> grammar, see http://raboof.sourceforge.net/).
> 
> My questions were: Is this really necessary? Are the options changing
> so often that it is necessary to define then in an extra file? What is
> the benefit of having them in a extra file?
> 
> These are not rhetorical questions: you are already the second person
> suggesting to use an external XML file, and I just do not see the
> benefits of doing so. It would be great if you could elaborate a
> little on why you think an extra XML file is a good idea.
> 
> Bernd
> 
> PS: A final question: if I add support of some XML configuration,
>     should I develop a code-generator that translates XML into Eiffel
>     code, or should I configure the command line options dynamically
>     by reading the XML every time I run the program?

Both ;-)

My opinion is that a good library should be flexible enough to
allow its users to do whatever they want. Your approach emphasizing
the simplicity of use is wonderful. This is definitely the first
thing that people should encounter when they look at this library.
But then nothing prevents such library from providing more complex
usages for advanced users who really want to do it the hard way.
I'm not necessarily a proponent of XML, but if people want it to
let them think that they have more control over what they do, or
if they find it more convenient than what you showed in your
simple example, then why not. But again this should be marked as
"advanced usage". I really like the simplicity of your example,
although I didn't have time yet to look at your library classes.
I like it so much that I wish you would like to include it into
the Gobo project (modulo the use of agents).

-- 
Eric Bezault
mailto:ericb-D6Qt/9opevxWk0Htik3J/[email protected]
http://www.gobosoft.com



To Post a message, send it to:   [email protected]
To Unsubscribe, send a blank message to: [email protected] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/gobo-eiffel/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.