Hi Valentin,

Le 29/10/2022 à 00:42, Valentin Petzel a écrit :
Lilypond with Guile 1.8 used a less capable version of the format command that
did not feature a destination argument (the default simple-format of Guile).
With Guile 2  Lilypond uses the full, powerful ice9 format (as can be seen
using #(display format)).

ice9 format takes a destination argument as first argument. This one can be any
output port, #t for the current output port (i.e. you print the result) or #f
to return the result.


Not sure what makes you think that?

Test input:

\version "2.22.2"

#(ly:message "~s ~s ~s"
             format
             simple-format
             (@ (ice-9 format) format))


2.22 output:

#<procedure format args> #<primitive-procedure simple-format> #<procedure format args>


2.23.80 output:


#<procedure 7fe7e0088b80 at ice-9/format.scm:1609:9 (destination format-string . args) | (deprecated-format-string-only)> #<procedure simple-format (_ _ . _)> #<procedure 7fe7e0088b80 at ice-9/format.scm:1609:9 (destination format-string . args) | (deprecated-format-string-only)>



As you can see, the format procedure loaded by default in LilyPond

files is always the one from (ice-9 format).



As far as I can see, simple-format has always required a boolean or port

as first argument. As for (@ (ice-9 format) format), its first boolean

or port argument is optional in Guile 1, optional with a deprecation

warning in Guile 2, and required in Guile 3.


Best,

Jean



Reply via email to