guix-devel
[Top][All Lists]
Advanced

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

Re: Add a way to disable serialization support to (guix services configu


From: Ludovic Courtès
Subject: Re: Add a way to disable serialization support to (guix services configuration)
Date: Fri, 23 Apr 2021 00:28:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hi,

Maxim Cournoyer <maxim.cournoyer@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.

Ludo’.



reply via email to

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