|
From: | Jim Ursetto |
Subject: | Re: [Chicken-users] Minor problem with args egg |
Date: | Wed, 13 May 2015 11:55:48 -0500 |
On Wed, May 13, 2015 at 03:38:41AM -0600, Matt Gushee wrote:
> Anyway, it seems that if you specify an option with no arguments, e.g.
>
> (args:make-option (v version) #:none
> "Display compiled versions.")
>
> ... then when the user invokes the program with that option, you get:
>
> '((v . #f) (version . #f))
>
> ... which means that alist-ref will not tell you whether the user passed
> that option, or it simply isn't present. I wonder if it wouldn't be better
> for a no-arg option to produce a symbol, #:undefined perhaps?
I would expect #t to be present if the user passed the option. This
allows for easy presence-checking, and it's similar to an option that
accepts "yes" or "no".
[Prev in Thread] | Current Thread | [Next in Thread] |