[Haskell-cafe] Syntax programming with lexemes rather than trees?

Yitzchak Gale gale at sefer.org
Wed Mar 24 09:12:13 EDT 2010

Stephen Tetley wrote:
> LilyPond has already answer this one...
> trying for a typed
> representation would be too restrictive - LilyPond has a very large
> LaTeX style syntax for assembling scores.

I find LilyPond's very monolithic very stateful representation
to be ugly and awkward. It clearly misses out most of the
underlying structure - and in correspondence with the authors on
the mailing list there, it is clear that they are aware of this.
They chose a certain representation philosophy based on a
weird ad hoc blend of Scheme and LaTeX, and they are sticking
with it to the bitter end only because it's far too late to turn back.

Don't get me wrong - I love LilyPond, it is an absolutely fantastic
piece of software. But the kinds of kluges and backflips that you
need to get even simple things done sometimes is staggering.

Example: when you write a simple lead sheet with named
chords, you'll always want to use "chordChanges" mode. But
then, if the first chord in the second ending of a volta repeat is
the same as the last chord in the first ending, it will be omitted.
Because after all, the whole piece is just a linear stream of
tokens with no structure. With work you can get the chord to
print, but what a mess. And then if you want to change something,
you have to undo the whole mess and do it again.

You are absolutely right that the structure of music representation
is not simple at all. But it is there. Please don't give up.


More information about the Haskell-Cafe mailing list