[darcs-users] [issue1550] general purpose command line parsing library (CmdArgs)
kowey at darcs.net
Thu Oct 22 10:08:05 UTC 2009
Just forwarding this to the list :-)
On Thu, Oct 22, 2009 at 09:46:47 +0100, Neil Mitchell wrote:
> I've been on honeymoon for the last 3 weeks, so apologies for getting
> to this conversation a bit late!
> Reinier: Regarding binary vs text issues, it's a good idea that the
> command line argument library should handle this. I'm guessing the
> difference should be specified in the types? i.e. have String for
> things you want converting, and a newtype over String/ByteString for
> things that are just lists of bytes.
> Eric: The use of Set is basically just records but without the default
> management. Since the default management is probably quite handy to
> isolate, I still think records are the way to go. GenI seems a
> particularly complex command line method, so I think I'll avoid making
> cmdargs powerful enough to handle it for now :-)
> I will make a point of talking to Duncan about command line arguments
> whenever I next bump in to him - I'm sure Cabal has some interesting
> ideas that are very worth stealing.
> Regarding the performance implications, I'd be shocked if the command
> line argument processing ever shows up in a profile. With using a
> record to look up values the use of command line arguments throughout
> the program should be as small as it can possibly be - although I
> doubt it would be that large anyway.
> 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.
> Thanks, Neil
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
Size: 195 bytes
Desc: not available
More information about the darcs-users