On Wed, May 13, 2015 at 4:52 AM, Peter Bex <pe...@more-magic.net> wrote:
> 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". > #t does seem to make sense ... the existing behavior comes from the srfi-37 implementation which sets the value to #f for #:none args. I could modify the args egg to change #f to #t in this case; I don't think this would cause any problems. Will think it over tonight. Jim
_______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users