[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Lilypond error behaviour
From: |
Johannes Waldmann |
Subject: |
Re: Lilypond error behaviour |
Date: |
Tue, 19 Apr 2016 19:54:47 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 |
Peter Gentry wrote:
> ... how the heck does the code know what your intentions are
> and what is an "error" in your source.
(wearing my professional hat for a moment)
in the programing languages I use and teach, the answer is:
"from static type declarations".
I declare types of identifiers exactly
for the purpose of documenting my intentions.
Then the compiler *can* figure out
whether my source corresponds to these intentions.
This gives me machine-checked documentation.
What more could we hope for? ..
In lilypond, bar checks is one such way of documenting an intention,
and have it machine-checked (at run-time, but nevertheless).
I can easily imagine more here, e.g.,
specify the total length of a music expression,
or that music expressions (inside << .. >>) should have equal lengths.
- J.W.
- Re: Lilypond error behaviour, (continued)
Re: Lilypond error behaviour,
Johannes Waldmann <=