Dne Čt 29. srpna 2013 07:35:58, [email protected] napsal(a):
> 2013/8/28 11:59 -0700, [email protected]:
> > Seems the kind of utility everyone has to write once from scratch, right?
> > I
> > did it as well as it seemed no existing parser matches our needs.
> 
> Yes.  We didn't write joptsimple; it was written by Paul Holser [1].
> It's not perfect, but it's better than all the others I surveyed a
> couple of years ago.

I see. I got confused by a source being commited into the Hg and considered 
that an attempt to write CLI parser from scratch.

> > NetBeans offers standalone, modular, ServiceLoader based, declarative,
> > POSIX complient approach for parsing command line arguments in a single
> > JAR API:  ...
> I didn't know this -- thanks for pointing it out.  I'll take a look.

SendOpts API[2] benefit could be its modularity support - e.g. various modules 
contribute its options and the system then verifies overall consistency of a 
command line and distributes the CLI arguments to appropriate modules. If such 
composition and decomposition is not needed then [1] looks OK and in certain 
areas (number format of an argument, for example) more powerful.
-jt

> [1] http://pholser.github.io/jopt-simple/
[2] http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-sendopts/

Reply via email to