guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using an SRFI that is not available in Guile


From: Attila Lendvai
Subject: Re: using an SRFI that is not available in Guile
Date: Tue, 18 Jan 2022 17:06:28 +0000

> There’s no widespread “Maybe” idiom in Scheme; or rather, people use
> TYPE | #f as a way to approximate “Maybe”. It’s not ideal, primarily
> because appropriate handling is not statically checked. Yet, that’s
> what we have and I’m not convinced adding SRFI-189 to the mix would
> bring enough of an improvement to justify it.
>
> Thoughts?


configurations are full of boolean fields, where #f is a valid value.

to represent unset fields, we would essentially need to implement half
of srfi-189 (Maybe and Nothing), and in a potentially buggy way
(e.g. using a symbol like 'disabled to represent an unset field value
(i.e. the current solution) clashes with a field type of symbol?).

i don't think it's worth rolling our own when an srfi covers what we
need.

--
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“Go find yourself first, so you can find me.”
        — Rumi (1207–1273)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]