[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Minor problem with args egg
From: |
Peter Bex |
Subject: |
Re: [Chicken-users] Minor problem with args egg |
Date: |
Wed, 13 May 2015 11:52:37 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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".
Cheers,
Peter
signature.asc
Description: Digital signature