[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Not Nice Review of the LilyPond
From: |
David Kastrup |
Subject: |
Re: Not Nice Review of the LilyPond |
Date: |
Sun, 02 Dec 2018 20:48:59 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
address@hidden writes:
> On Sun, 2 Dec 2018, David Sumbler wrote:
>> > But MusiXTeX can do "if" statements.
>
>> I felt that an "if" would be useful, so I eventually came up with:
>
> That is useful for conditional includes, but it can't be embedded in the
> data structure that LilyPond calls "music" and stores in variables. As
> soon as something is turned into "music" it has to be data, not code;
> conditionals must either be evaluated before the input is turned into
> "music," or by separate code (usually, in Scheme rather than in LilyPond
> as such) that conditionally modifies the static "music." That latter
> approach, with tags in the "music" that can be filtered out, is what's
> usually recommended as a substitute for real conditionals in LilyPond, but
> it's quite limiting compared to what programming languages can do with
> "if."
>
> For those familiar with programming languages it's not so mysterious why
> this situation comes about. LilyPond takes care to call its variables
> variables in the documentation. You reference them; you don't execute
> them. They contain data, not code. Obviously, data will be the same
> every time you look at it, unless you externally change it. But I wish
> that without escaping to Scheme I could have something more like a macro
> than like a variable, evaluating its conditionals (and doing other
> programming-language stuff) every time it is used.
Have you looked at tags?
--
David Kastrup
- Re: Not Nice Review of the LilyPond, (continued)
- Re: Not Nice Review of the LilyPond, Sandro Santilli, 2018/12/02
- Re: Not Nice Review of the LilyPond, Thomas Morley, 2018/12/02
- Re: Not Nice Review of the LilyPond, David Kastrup, 2018/12/02
- Re: Not Nice Review of the LilyPond, mskala, 2018/12/02
- Re: Not Nice Review of the LilyPond, David Kastrup, 2018/12/02
- Re: Not Nice Review of the LilyPond, David Sumbler, 2018/12/02
- Re: Not Nice Review of the LilyPond, mskala, 2018/12/02
- Re: Not Nice Review of the LilyPond,
David Kastrup <=
- Re: Not Nice Review of the LilyPond, mskala, 2018/12/02
- Re: Not Nice Review of the LilyPond, David Sumbler, 2018/12/02
- Re: Not Nice Review of the LilyPond, David Kastrup, 2018/12/02
- Re: Not Nice Review of the LilyPond, Sandro Santilli, 2018/12/02
- Re: Not Nice Review of the LilyPond, Thomas Morley, 2018/12/02
- Re: Not Nice Review of the LilyPond, Sandro Santilli, 2018/12/02
- Re: Not Nice Review of the LilyPond, David Kastrup, 2018/12/02
- Re: Not Nice Review of the LilyPond, Thomas Morley, 2018/12/02
- Re: Not Nice Review of the LilyPond, David Kastrup, 2018/12/02
- Re: Not Nice Review of the LilyPond, Omer Katzir, 2018/12/02