Re: maybe-let* Marc Nieper-WiÃkirchen 03 Jul 2020 05:54 UTC
Am Fr., 3. Juli 2020 um 05:11 Uhr schrieb Shiro Kawai <firstname.lastname@example.org>: > > Ok, I updated Gauche's implementation according to draft #8. > > - The value returned from the case of empty claws and empty body can be explicitly stated (Just/Right of an undefined value). It can be deduced from the parallel of and-let* and maybe-and, but less room of misinterpretation. We can also explicitly state about the non-empty claws and empty body case. As and-let* unwraps the Just/Rights, an empty (maybe-let*) should return #t. > - Would it be too much to handle multi-value Just/Right in claws? We can define CLAW as > (VAR ... MAYBE-EXPR). I think the same syntax than in let*-values should be used. So single values need one more level of parentheses compared to SRFI 2's and-let*. Excluding multiple values would destroy one main use case for the Maybe protocol. > Potential drawback is that, with that definition, (MAYBE-EXPR) looks like expecting a zero-value Just, while in the current definition it can be any Just. Zero values would be (() MAYBE-EXPR), which is just fine.