[Top][All Lists]

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

Re: Not Nice Review of the LilyPond

From: mskala
Subject: Re: Not Nice Review of the LilyPond
Date: Sun, 2 Dec 2018 14:17:11 -0500 (EST)
User-agent: Alpine 2.20 (LNX 67 2015-01-07)

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

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.

Matthew Skala
address@hidden                 People before tribes.

reply via email to

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