Email list hosting service & mailing list manager

Maybe macros John Cowan (26 Jun 2020 17:16 UTC)
Re: Maybe macros Marc Nieper-Wißkirchen (26 Jun 2020 17:43 UTC)
Re: Maybe macros John Cowan (26 Jun 2020 18:48 UTC)
Re: Maybe macros Marc Nieper-Wißkirchen (26 Jun 2020 18:57 UTC)
Re: Maybe macros John Cowan (27 Jun 2020 04:29 UTC)
Re: Maybe macros Arthur A. Gleckler (26 Jun 2020 19:50 UTC)
Re: Maybe macros John Cowan (26 Jun 2020 19:52 UTC)
Re: Maybe macros Wolfgang Corcoran-Mathe (27 Jun 2020 03:44 UTC)
Re: Maybe macros Arthur A. Gleckler (27 Jun 2020 03:59 UTC)
Re: Maybe macros Wolfgang Corcoran-Mathe (27 Jun 2020 04:15 UTC)
Re: Maybe macros Arthur A. Gleckler (27 Jun 2020 04:29 UTC)
Re: Maybe macros Wolfgang Corcoran-Mathe (27 Jun 2020 14:09 UTC)
Re: Maybe macros John Cowan (27 Jun 2020 18:55 UTC)
Re: Maybe macros Marc Nieper-Wißkirchen (27 Jun 2020 20:46 UTC)
Re: Maybe macros John Cowan (27 Jun 2020 21:34 UTC)
Re: Maybe macros Wolfgang Corcoran-Mathe (28 Jun 2020 17:26 UTC)
Re: Maybe macros Marc Nieper-Wißkirchen (28 Jun 2020 17:43 UTC)
Re: Maybe macros Wolfgang Corcoran-Mathe (28 Jun 2020 18:52 UTC)
Re: Maybe macros Marc Nieper-Wißkirchen (28 Jun 2020 20:24 UTC)
Re: Maybe macros John Cowan (28 Jun 2020 18:54 UTC)
Re: Maybe macros Marc Nieper-Wißkirchen (28 Jun 2020 20:21 UTC)
Re: Maybe macros Alex Shinn (29 Jun 2020 00:02 UTC)
Re: Maybe macros Marc Nieper-Wißkirchen (29 Jun 2020 06:23 UTC)
Re: Maybe macros Wolfgang Corcoran-Mathe (28 Jun 2020 16:54 UTC)

Re: Maybe macros Marc Nieper-Wißkirchen 26 Jun 2020 17:43 UTC

Am Fr., 26. Juni 2020 um 19:16 Uhr schrieb John Cowan <xxxxxx@ccil.org>:
>
> It occurred to me that it would be useful to have maybe-and, maybe-or, and maybe-and-let* macros that treat all Justs as true and Nothing as false.
>
> 1) What do people think of the idea?

I've already lobbied for maybe-and-let* (which may be abbreviated to
maybe-let*), so I am in favor of these macros.

Maybe-and-let* should unwrap the Justs when binding to the variables.

Note that we can get rid of maybe-and maybe-or if we change the
semantics of SRFI 189 and set Nothing := #f. It doesn't reduce the
expressiveness of Maybe types in any important way. Moreover, it may
help to tame the zoo of falsy values. Currently, we have #f, #<eof>,
Nothing, (). Some implementations add #<void>. This is already more
than in Javascript with False, Null, and Undefined.

> 2) Does it belong in this SRFI or should it wait for a later SRFI?

As the SRFI is not finalized yet, I would add them to this SRFI.  It
doesn't cost anything.