Re: cmdline.ss library in PLT
Anthony Carrico 26 Sep 2002 13:36 UTC
On Wed, 25 Sep 2002, Robert Bruce Findler wrote:
> Beyond this problem, are there other problems? One question I have: how
> could one implement the once-any specifier in the cmdline.ss library?
Good question.
I would argue that "once-any" options are actually modes. I would use the
main set of "once-any" options as the first operand (instead of an
option), and make the minor "once-any" option sets arguments their common
"mode option".
Of course, sometimes we must match an existing interfaces. In this case, I
would use an option table (passed from option processor to option
processor). I would use a single "mode entry" in this table for each group
of "once-any" options. The option processor for each "once-any" option
could check its "mode entry", and issue an error or warning if a mode was
already selected.
-Anthony Carrico