guix-devel
[Top][All Lists]
Advanced

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

Re: What's the meaning of the percent sign in variable names


From: Leo Prikler
Subject: Re: What's the meaning of the percent sign in variable names
Date: Fri, 23 Apr 2021 16:49:05 +0200
User-agent: Evolution 3.34.2

Am Freitag, den 23.04.2021, 14:22 +0000 schrieb Luis Felipe:
> Hi,
> 
> Are all these constants (%base-packages, for example)? Is this a Guix
> convention or does it come from Guile? Although looking at Guile's
> Variable index I see many constants in uppercase, and also some
> variables prefixed with the percent sign, while Guix' Programming
> index doesn't seem to list any uppercase names.
The tendency to prepend variables with % certainly comes from Guile or
more generally Scheme.  The upper case constants in Guile likely come
from C, where this convention is more popular and IIUC often concerns
integer constants, that are in some way important for the C side of
things (think of stuff like OPEN_READ).  Since that is not a concern
for Guix, a package manager mostly written in Guile Scheme, we can
prefix our constants with a percent sign.

Regards,
Leo




reply via email to

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