Lisp options




On Thu, 9 Jul 2009, Raymond Toy wrote:

< Aleksej Saushev wrote:
< > The main part isn't about POSIX, it is about POLA.
< > You "gratuitously" break long established practice, which lasts for a
< > very long time (since 4.3BSD at least, which makes 25 years, a generation).
< >
< >   
 Anyway, I've hacked on Kevin's getopt some and it seems like it will
< work and (gasp!) recognize -abc as -a -b -c.

Good.

< 
< However, the list of options is somewhat incompatible because getopt
< wants unique abbreviations. We currently have -b, --batch, --batch-lisp,
< and --batch-string. Getopt won't recognize -b as equivalent to --batch
< because it's not a unique abbreviation. And --batch will never be
< recognized because it's not a unique abbreviation of --batch-lisp and
< --batch-string.
< 
< To continue with getopt, we'd have to rename many of the options. I
< don't see much point in that. People will be astonished that options
< that used to work no longer do, so we'd violate POLA.

Ray,
I think that what is need is a hash table to transform short
options to long.

I'm in favour of trying to be posix-compliant on this matter. It is
important, especially for new users, that things work as expected.
And, as I said before, getopt provides better error-catching/handling
than does our present arrangement.

Leo

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.