Re: [frogs] Adding docstring support to def-grace-function

[ Thread Index | Date Index | More lilynet.net/frogs Archives ]


On Wed, Jan 7, 2009 at 7:40 AM, Carl D. Sorensen <c_sorensen@xxxxxxx> wrote:
>
> On 1/7/09 12:51 AM, "Patrick McCarty" <pnorcks@xxxxxxxxx> 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

---

----
Join the Frogs!


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/