[darcs-users] [issue1550] general purpose command line parsing library (CmdArgs)

Eric Kow kowey at darcs.net
Wed Oct 28 15:49:59 UTC 2009

Hi Neil,

On Thu, Oct 22, 2009 at 11:08:04 +0100, Eric Kow wrote:
> Regarding the performance implications, I'd be shocked if the command
> line argument processing ever shows up in a profile.

I don't think anybody is seriously worried about performance for
command line argument processing.

> Uniformly using the last flag as the one that takes effect is trivial
> to do systematically, and I'll make it the default for cmdargs. I
> agree that shell aliases probably make this the only sensible choice.

One thing to note also is that our defaults system goes a little
something like

 hard-coded darcs defaults
 global user defaults
 repository defaults
 what the user implicitly types (shell aliases)
 what the user explicitly types in

Note also that each command has its own set of defaults.  Clearly,
cmdargs can nicely handle the case for the hard-coded darcs defaults.
It would be nice if it could also handle it for the global user defaults
and the repository defaults.

One minor complication is that the global user and repository level
defaults are expressed using things which look a lot like command line
arguments (I think the dashes are optional, and there may be some issues
with quoting).  Unfortunately, I don't really remember how our handling
of the defaults files works.  Perhaps somebody on the list can chime in
if needed.



PS: We're sprinting on the weekend of 14-15 November (in Vienna and
    Portland) just in case you wanted to join us or to have your own
    sympathetic cmdargs hackfest around the same time :-)

Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20091028/4caf36ff/attachment.pgp>

More information about the darcs-users mailing list