Hi,

On Fri, Apr 23 2021, Ludovic Courtès wrote:

> Hi,
>
> Maxim Cournoyer <maxim.courno...@gmail.com> skribis:
>
>>> +(define-syntax-rule (without-field-serialization definition)
>>> +  (syntax-parameterize ((configuration-field-serialization?
>>> +                         (identifier-syntax #f)))
>>> +    definition
>>> +    #t))
>>> +
>>> +(without-field-serialization
>>> +  (define-configuration foo
>>> +    (bar (integer 123) "doc")))
>
> In hindsight, I find this syntax quite inelegant and suboptimal.
>
> Wouldn’t it be nicer to write:
>
>   (define-configuration foo
>     (bar (integer 123) "doc" no-serializer)
>     (baz (string "") "doc"))
>
> where ‘bar’ wouldn’t have a serializer and ‘baz’ would?
>
> It’s also probably easier to implement correctly.

I think that would be a good idea, maybe it could also make having a
default value be optional, like this:

#+begin_src scheme
(define-configuration foo
  (bar (integer) "doc" no-serializer) ;no default
  (baz (string "default") "doc"))
#+end_src

Maxim and I had a discussion about this[1].

[1]: https://yhetil.org/guix-devel/87k0ov7w72....@yoctocell.xyz

Reply via email to