[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: global variables
From: |
David Kastrup |
Subject: |
Re: global variables |
Date: |
Wed, 15 Jan 2014 17:48:39 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
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
- Re: (no subject), (continued)
- Re: global variables, Paul Scott, 2014/01/15
- Re: global variables, Peter Bjuhr, 2014/01/15
- Re: global variables, David Kastrup, 2014/01/15
- Re: global variables, Peter Bjuhr, 2014/01/15
- Re: global variables, David Kastrup, 2014/01/15
- Re: global variables, Peter Bjuhr, 2014/01/15
- Re: global variables, Jacques Menu, 2014/01/15
- Re: global variables,
David Kastrup <=
- Re: global variables, Alex Loomis, 2014/01/15
- Re: global variables, David Kastrup, 2014/01/16
- Re: global variables, Paul Scott, 2014/01/15
- Re: (no subject), Eluze, 2014/01/15
- Re: (no subject), David Kastrup, 2014/01/15