On Mon 28 Dec 2015 at 20:27:22 (+0100), David Kastrup wrote:
> Johan Vromans <jvrom...@squirrel.nl> writes:
> 
> > On Mon, 28 Dec 2015 19:01:47 +0100
> > Urs Liska <u...@openlilylib.org> wrote:
> >
> >> > part = cello
> >> > 
> >> > \score {
> >> >   \"bella_melodia_\part"
> >> > }
> >> 
> >> I think something like this should be achievable using a music function
> >> with two string arguments.
> >
> > Yes, but my suggestion was to have a mechanism for interpolation of
> > variables in strings, which is much more generic, flexible and
> > powerful.
> 
> The above is mainly confused.  Remember that \n in a string stands for
> newline.
> 
> > And most programming languages have it.
> 
> Uh what?  Bourne shells can interpolate variables (written with $ rather
> than \ by the way) into _double_-quoted strings.  Maybe some other
> shells can.
> 
> But what _programming_ languages allow interpolating into quoted
> strings?  The C preprocessor can expand #identifier into a string, and
> juxtaposed with other double-quoted strings they combine into a larger
> string I believe.  But that's only for preprocessor constants, and those
> are not really part of the language proper.
> 
> The strings in Python's regular expression replacements can interpolate
> variable values, but those are not part of the string syntax but of the
> regexp replacement semantics.

Recognising the lack of this construct, python is currently adding string
interpolation to the language.

https://www.python.org/dev/peps/pep-0498/

Cheers,
David.

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

Reply via email to