Subject: Re: [bug#36239] [PATCH] opensmtpd-service-type to extend pam

From: Ludovic Courtès <[email-masked]>
Date: Thu, 20 Jun 2019 14:49:51 +0200

Tobias Geerinckx-Rice <[email-masked]> skribis:

> Ludovic Courtès wrote:
>> I think I’d use it here; that’s consistent with the rest of the file
>> actually, no?  To me everything looks OK as it is.
>
> Then I'm not sure I grok % (which is likely as I've never read a
> description, only induced its use).
>
> What's the difference between:
>
> (define (%dovecot-activation config) …
>
> and
>
> (define opensmtpd-activation …
> (define exim-activation …
>
> ?  I thought it had something to do with being exports/globals but
> here (%opensmtpd-accounts, etc.) it is used simply to say ‘this is a
> list’.

It’s a long story.  :-)

Initially in Guile the ‘%’ prefix was used for “system” bindings, thing
you don’t normally use as a normal user.  Then I think I started using
it for things that are meant to be “internal” or variables meant to be
read-only (not procedures).  In Guix we sort of follow that but somewhat
extend the meaning.

In the example above, I’d rather write ‘dovecot-activation’ (without
prefix, because it’s a procedure), but I’d probably write
‘%exim-activation’, depending on the phase of the moon.

HTH!

Ludo’.