lilypond-user
[Top][All Lists]
Advanced

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

Re: global variables


From: Alex Loomis
Subject: Re: global variables
Date: Wed, 15 Jan 2014 19:38:52 -0500

>there may be some temptation for offering a
>LilyPond-native syntax for that.

Pretty please? It's the feature I've been missing the most in lilypond.

On Wed, Jan 15, 2014 at 11:48 AM, David Kastrup <address@hidden> wrote:
Jacques Menu <address@hidden> writes:

> Le 15 janv. 2014 à 17:15:53, David Kastrup <address@hidden> a écrit :
>
>> Peter Bjuhr <address@hidden> writes:
>>
>>> On 01/15/2014 04:54 PM, David Kastrup wrote:
>>>> Peter Bjuhr <address@hidden> writes:
>>>>
>>>>>
>>>>> I've started using global variables more recently but can highly
>>>>> recommend it!
>>>> Just don't let any programmers hear that.
>>>>
>>>
>>> David, I'm sorry; I must again ask you what you mean? Is this a joke
>>> I'm missing like the previous time with the biblical quote?
>>
>> <URL:https://en.wikipedia.org/wiki/Global_variable>, 2nd paragraph.
>
>
> Isn’t what you call an LP global variable actually a macro, as in
> LaTeX?

No.  A macro is a textual replacement with parameters (in Scheme, a
"macro" is something entirely different but similar).

Something like

#(define-music-function ... #{ ... #})

comes close, and there may be some temptation for offering a
LilyPond-native syntax for that.

At any rate, all proper LilyPond variables are actually global
variables.  When programming in Scheme, you have recourse to local
variables.  LilyPond is extensible in Scheme, but it does not in itself
constitute a _programming_ language.  Assignments are likely the most
programming-like constructs it offers, but it's not like you can put
them in a loop or something without reverting to Scheme.

--
David Kastrup

_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user


reply via email to

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