lilypond-devel
[Top][All Lists]
Advanced

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

Re: Add option to indicate frets by letters in tablature (issue164063)


From: Carl Sorensen
Subject: Re: Add option to indicate frets by letters in tablature (issue164063)
Date: Sun, 6 Dec 2009 18:51:22 -0700



On Dec 6, 2009, at 5:18 PM, "Trevor Daniels" <address@hidden>  
wrote:

>
> Carl Sorensen wrote Sunday, December 06, 2009 9:59 PM
>>
>> On 12/6/09 9:50 AM, "Trevor Daniels" <address@hidden>
>> wrote:
>>>
>>> I changed it because "string" is a keyword in Scheme.
>>> It is even used as such in the same few lines of code.
>>> Although "string" can be used as a variable name I don't
>>> think it should be - it seems bad practice to overload
>>> keywords in this way.
>>
>> I don't know of string as a keyword in Scheme.  It's not listed in
>> the Guile
>> reference manual index.
>>
>> string?  is a predicate.
>>
>> substring is a procedure.
>>
>> There are a bunch of string-*, string->*, and *->string
>> procedures.
>>
>> But string by itself seems to not be part of the Scheme language.
>> Have I
>> missed something? (I easily could have.)
>
> I think you have.  string is a built-in procedure which
> forms a string from one or more characters.  Try
>
> guile> (string #\a #\b)
>
> It outputs "ab".
>
> It's actually used in the code in question, which was
> what prompted me to change it.  "string" was being used
> with two meanings in the same procedure.
>

Oh, yes. I forgot about that function.

Clearly we should not overload that.



>>> I fully agree with your point in general, but we need
>>> to think of a variable name other than "string" for the
>>> string on an instrument.  I tried, and failed :(, hence
>>> str.
>>
>> Dana suggests "course", which I guess speaks well to lute players.
>> But not
>> to guitar players.
>>
>> string seems the best to me.
>
> I prefer str to course and string, but if no other ideas
> are forthcoming I'll use string_number.
>

string_number seems so awkward.  But it's more descriptive than str.   
And I can't think of anything better.

>>>>

>>>> .  The fretLabels list
>> wouldn't need to
>> be characters; they could be markups or stencils, so users could
>> define
>> whatever is needed or desired.
>
> I quite like the term fretLabels, with the list being of
> anything that evaluated to a Scheme string.

Why a string instead of a string or a markup?

Thanks,

Carl

>




reply via email to

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