lilypond-user
[Top][All Lists]
Advanced

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

Re: music-function name shadowing a Scheme keyword


From: Jan-Peter Voigt
Subject: Re: music-function name shadowing a Scheme keyword
Date: Wed, 27 Jun 2018 10:48:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

Hi Urs,

you might import the SRFI-1 span-function and give that a new name. The counterpart-function to span is break, which "conflicts with the break binding established by while (see while do). Applications wanting to use break from within a while loop will need to make a new define under a different name."
You might provide such an alternative name for "span".

Personally I'd prefer another name for your function, because srfi-1-span is "prior art" ;-)
and *now* you can give it a name that does not conflict.

Jan-Peter


Am 26.06.2018 um 22:43 schrieb Urs Liska:
Hi all,

I've mostly completed the implementation of a "span" module that provides the \span music-function, which is roughly the same as the HTML <span class=""> element.

Nearly everything works fine by now, and I've been very happy with the name - until I realized that a music-function \span can be invoked from Scheme with (span), and that this shadows the Scheme procedure span from SRFI-1.

Am I right to assume that this *can* work - as long as no user of my package will think of using the original Scheme function?

Is there any way to get around this without renaming my music function?

Urs


_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user




reply via email to

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