lilypond-user
[Top][All Lists]
Advanced

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

Re: try except in lilypond


From: Andrew Bernard
Subject: Re: try except in lilypond
Date: Sat, 19 Nov 2016 21:26:18 +1100

Hi Mike and Joram,

On 19 November 2016 at 21:06, Mike Solomon <address@hidden> wrote:
One thing I've used in the past for this sort of thing are Scheme functions, specifically file-exists? .


Another solution is to use some sort of top-level compilation script in bash or python, which is how i manage style sheets for large scores (I generate temporary ly files on the fly).


Since lilypond uses Guile 1.8 and not MIT Scheme, you may be better off looking here for file system functions:


[Although I myself often derive useful inspiration from looking at other Scheme implementations.]

Joram,

Exceptions are not built in to Scheme but you can implement them in a library yourself with continuations if you are keen.

For example:


This is not particularly trivial stuff, but it works. In general though functional programmers tend to avoid exception style coding, for a long list of reasons. But that's another story and probably another separate mailing list (lilypond-scheme anybody :-)).

As to actually implementing exceptions around lilypond code, I have not tried it so I cannot fully answer your question.

Andrew



reply via email to

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