Re: New draft (#5) of SRFI 189: Maybe and Either: optional container types Marc Nieper-WiÃkirchen 15 Jun 2020 08:24 UTC
Am Mo., 15. Juni 2020 um 08:22 Uhr schrieb Marc Nieper-Wißkirchen <email@example.com>: > > Am Mo., 15. Juni 2020 um 01:57 Uhr schrieb John Cowan <firstname.lastname@example.org>: > > >> If you want to go with such a long word, `list/false' is not longer, > >> but maybe clearer. Why don't you like `->list*'? > > > > > > Because "*" has no fixed meaning in Lisp; it's like the use of ' or _ in Haskell as the equivalent of mathematical prime. Prime is useful in local scope, but not very helpful at all in global scope. > > let* is a good example, which exists at the global scope. The "*" may > not be the best choice, but it better conveys (while definitely not > optimally) the meaning than the suffix "multitruth". > > We could also drop the naming scheme with "->" for these procedures > altogether (as the (co-)domain list + false does not have a name as a > Scheme type) for more freedom in naming. > > Maybe others have better suggestions. Anyway, it is just a name (so rather irrelevant compared with the unfold thing, which, I think, the draft objectively gets wrong). - Could you add `either->truth' and `either->multitruth' and `truth->either' and `multitruth->either' as well? (The contents of a Left are to be dropped as in `either->maybe'.) These procedures seem to be missing for completeness. - The name `generator->maybe' is misleading, I think. I would suspect that it takes a generator and returns a maybe. But it takes a value produced by a generator. The same holds for `maybe->generator'. For completeness, add a similar pair of procedures for Eithers.