lilypond-devel
[Top][All Lists]
Advanced

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

Re: [GLISS] turn xxx.yyy into ("xxx" "yyy")


From: David Kastrup
Subject: Re: [GLISS] turn xxx.yyy into ("xxx" "yyy")
Date: Wed, 12 Sep 2012 17:04:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

Han-Wen Nienhuys <address@hidden> writes:

> On Wed, Sep 12, 2012 at 5:38 AM, David Kastrup <address@hidden> wrote:
>>
>> Hi,
>>
>> if we write xxx in LilyPond, this is considered to be a string.  I want
>> xxx.yyy.zzz to be a list of strings ("xxx" "yyy" "zzz").  The main
>> incentive is to be able to have music functions be able to accept both
>> Stem as well as Staff.TimeSignature as a function argument.
>
>> What do you think?
>
> doesn't this a different polymorphic annoyances somewhere else, ie.
>
>   \set "keySignature" = #(..)
>   \set "Staff.keySignature" = #(..)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I don't think the second line was ever permitted.

> now, \set gets either a string (keySignature) or list of string. Are
> music function equipped to deal with this type of polymorphism.

A music function that is only able to deal with a string argument should
declare its argument type as string? and then it will only ever get a
string argument.

Music functions will not, in general, be prepared to deal with this sort
of polymorphism, their argument predicates will have stated this, and
consequently they will not get to see it.

-- 
David Kastrup



reply via email to

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