This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: getopt-long.scm (was: Re: getop-gnu-style.scm)


Maciej Stachowiak <mstachow@mit.edu> writes:

> I haven't looked in detail, but I have to admit I think the syntax for
> option specifiers is a bit odd for my tastes. I think it is more
> Schemely to use parentheses and values of various types as the syntax,
> rather than a bunch of words in one long list. I'd rather see option
> specs based on alists, perhaps like this:
> 
> `(((long "lockfile-dir") 
>    (required #t) 
>    (value 'required)
>    (short #\k)
>    (predicate ,file-is-directory?))
>   ((long "verbose") 
>    (required #f)
>    (short #\v)
>    (value #f))
>   ((long "x-includes")
>    (short #\x))
>   ((long "rnet-server")
>    (short #\y)
>    (predicate ,string?)))

'Odd' is a fair statement.  But then I was having so much fun getting
a grip on functional recursive descent parsing...

Expect this code to be reposted soon, with option specifications
of the form you describe.

> Other than that, it looks pretty nice overall.

Thanks.

-russ