[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: using an SRFI that is not available in Guile
From: |
Ludovic Courtès |
Subject: |
Re: using an SRFI that is not available in Guile |
Date: |
Wed, 19 Jan 2022 11:34:22 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Attila Lendvai <attila@lendvai.name> skribis:
>> 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?).
How about using ‘*unspecified*’ in those cases?
Out of curiosity, in what case do you need to represent “unset fields”?
I think in most or all of the existing configs, fields always have a
default value, there’s no “unset” state.
Thanks,
Ludo’.
- Re: using an SRFI that is not available in Guile, (continued)
- Re: using an SRFI that is not available in Guile, Attila Lendvai, 2022/01/13
- Re: using an SRFI that is not available in Guile, Maxime Devos, 2022/01/13
- Re: using an SRFI that is not available in Guile, Attila Lendvai, 2022/01/13
- Re: using an SRFI that is not available in Guile, Attila Lendvai, 2022/01/13
- Re: using an SRFI that is not available in Guile, Maxime Devos, 2022/01/14
- Re: using an SRFI that is not available in Guile, Attila Lendvai, 2022/01/17
- Re: using an SRFI that is not available in Guile, Maxime Devos, 2022/01/13
- Re: using an SRFI that is not available in Guile, Maxime Devos, 2022/01/13
Re: using an SRFI that is not available in Guile, Ludovic Courtès, 2022/01/18