Re: ANN: OP Command Line Parser 0.9.1
Neal Lester <neal-DEdZIOWp9kBWk0Htik3J/[email protected]>
| Newsgroups | gmane.comp.lang.eiffel.gobo.general |
|---|---|
| Message-ID | <[email protected]> |
> > 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?
>
>Benefits:
>
>1. You can create (part of) the man page that way.
>
>2. You can include it in your manual.
>
>3. You can create the --help automatically.
>
>4. It's easier to localise (yes, that's with a s outside America, my
> point!) your application.
<snip>
>Translate into Eiffel code is good enough for me.
One advantage of using XML and Translating into Eiffel Code is that
you can automatically create an eiffel object that models the user
selections. Something like
USER_COMMAND_LINE_SELECTIONS
recursive_selected: BOOLEAN
-- Did the user select the -r (--recursive) option on the
command line?
Now if I change my command line syntax, any application code that
depends on it will break at compile time as opposed to producing
(somewhat obscure) run time errors.
I also find code like
if command_line_options.recursive_selected then
more readable than code which refers to the flags directly
Neal
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/