> On May 13, 2015, at 11:55, Jim Ursetto <zbignie...@gmail.com> wrote: > > #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. >
In args 1.5.1, #:none options now return a value of #t instead of the srfi-37 default of #f, so they are effectively booleans. This would also set up the possibility for —no-xxxxxx options which set option ‘xxxxxx' to #f; naturally, that is not yet implemented. #:optional options will still return #f when an argument is not provided, since it is not nice to explicitly test against #t to distinguish between argument provided and not. Also, optional arguments should not be boolean in my opinion. An argument value of #f allows you to implement a default of “1" by placing this in the body: (set! arg (or arg “1”)) Jim _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users