unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Prikler <leo.prikler@student.tugraz.at>
To: Luis Felipe <luis.felipe.la@protonmail.com>,
	guix-devel <guix-devel@gnu.org>
Subject: Re: What's the meaning of the percent sign in variable names
Date: Fri, 23 Apr 2021 16:49:05 +0200	[thread overview]
Message-ID: <0567efc70b7282ff6f40173cba74a61ce2647644.camel@student.tugraz.at> (raw)
In-Reply-To: <56kdRcoBgRuaTJ3WDZuJafflQQ4gld466rsxEpaHBkAv63kjjShKEEaQyL3n01WgUFyuUHpqLtW9VuZyeV6H4_C6NdB5nXd7BGxYJZ1UbXg=@protonmail.com>

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	other threads:[~2021-04-23 14:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-23 14:22 What's the meaning of the percent sign in variable names Luis Felipe
2021-04-23 14:49 ` Leo Prikler [this message]
2021-04-24 13:29   ` Luis Felipe
2021-05-04 15:49 ` Ludovic Courtès
2021-05-05 14:18   ` Luis Felipe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0567efc70b7282ff6f40173cba74a61ce2647644.camel@student.tugraz.at \
    --to=leo.prikler@student.tugraz.at \
    --cc=guix-devel@gnu.org \
    --cc=luis.felipe.la@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).