[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question (define and set!)
From: |
David Kastrup |
Subject: |
Re: Question (define and set!) |
Date: |
Mon, 04 May 2020 12:38:15 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Jean Abou Samra <address@hidden> writes:
> Hi,
>
> Why do you often find constructs similar to this one in LilyPond's source?
>
> midi.scm line 26:
>
> (define-session-public absolute-volume-alist '())
> (set! absolute-volume-alist (append absolute-volume-alist etc.))
>
> line 72:
>
> (define instrument-names-alist '())
> (set! instrument-names-alist ...
>
> Is there any difference with (define-session-public
> absolute-volume-alist '(...)) ? I suspect there is one since this is
> frequent but I can't figure out what the purpose is here.
I don't see that it is frequent. You'll find it mostly in scm/midi.scm
and if you use git blame on that, you'll find that this style in this
file significantly precedes the introduction of define-session.
You'd have to ask Han-Wen and Jan for their respective motivations here.
--
David Kastrup