|
From: | David Nalesnik |
Subject: | Re: Scheme void function problems |
Date: | Wed, 25 Mar 2015 14:27:53 -0500 |
Hello,
thanks a lot for your thoughts, David.
Am 25.03.2015 um 16:33 schrieb David Nalesnik:
From the design point of view I think it’s necessary to have it first: it’s much more intuitive to write \language output "deutsch" than \language "deutsch" output.Hi Simon,
I can't judge whether this is getting closer to you want, but maybe my observations can help.
On Wed, Mar 25, 2015 at 9:17 AM, Simon Albrecht <address@hidden> wrote:
Hello,
I’m experimenting with an implementation of automatic tagline language selection and currently have two problems with the void function \language that I adapted from music-functions-init.ly:
– I can’t get the first, optional argument to work; it needs to be explicitly given or Lily will take the string as first argument – although it’s required to be a symbol.
I haven't succeeded in making this work with the optional argument in the first position. I moved it last.
I don’t quite get why having the optional argument first doesn’t work: after all, this is commonly used in music functions and scheme functions. But apparently define-void-function is implemented differently.
This would then mean that one has to always specify the first argument, which is not the most elegant form. I’ll probably switch to using three distinct functions \language, \inputLanguage and \outputLanguage (with the names being subject to discussion of course).
[Prev in Thread] | Current Thread | [Next in Thread] |