[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [frogs] Adding docstring support to def-grace-function
From: |
Patrick McCarty |
Subject: |
Re: [frogs] Adding docstring support to def-grace-function |
Date: |
Wed, 7 Jan 2009 11:03:04 -0800 |
On Wed, Jan 7, 2009 at 7:40 AM, Carl D. Sorensen <address@hidden> wrote:
>
> On 1/7/09 12:51 AM, "Patrick McCarty" <address@hidden> wrote:
>>
>> For A., using acciaccatura as an example, I propose the following syntax:
>>
>> acciaccatura =
>> #(def-grace-function (_i "add docstring") startAcciaccaturaMusic
>> stopAcciaccaturaMusic)
>
> There are two reasons I'd like to try something different than this syntax.
>
> First, docstrings always come after the arguments to the function.
Ah, yes. I did not think this through carefully enough.
> Second this syntax would require a convert-ly rule, and so would need to
> wait until work begins on 2.13.
Okay, I understand this now.
> A syntax that would not require a convert-ly rule would be
>
> acciaccatura =
> #(def-grace-function startAcciaccaturaMusic stopAcciaccaturaMusic
> (_i "Here is the docstring."))
>
> because the docstring argument can be written as an optional argument
> in the macro definition for def-grace-function. So adding a docstring
> is a syntax addition, not a change, and no convert-ly rule is needed.
I see a few Scheme procedures that use the #:optional keyword. This
is what you are referring to, right?
Thanks,
Patrick