[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue 2072 in lilypond: Add proper complex variables to Lilypond
From: |
David Kastrup |
Subject: |
Re: Issue 2072 in lilypond: Add proper complex variables to Lilypond |
Date: |
Sat, 03 Dec 2011 21:15:31 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) |
Werner LEMBERG <address@hidden> writes:
>> I propose developing the infrastructure that allows saying
>> violin = \makeVector 2
>> and afterwards using
>> \violin 1 = { ... } % backslash is no typo here
>> as well as { ... \violin 1 }
>> It will be possible to use arbitrary numbers (or Scheme expressions)
>> as index, and this would straightforwardly map to a Scheme vector of
>> size 2 called violin.
>
> Nice idea! A minor nit: I would like to somehow `bind' the number to
> the variable, something like `\violin{1}', to emphasize the
> vector-ness. Is this possible?
Uh, at the moment, nothing is possible since no line of code has been
written. If you are interested about what goes on in my head, you'd be
able to use either \violin1 or \violin#1 naturally (or \violin$1 if you
insist). \violin{1} would not work as long as {1} would not, by itself,
evaluate to 1 (which ##{ 1 #} already does IIRC, so that's not as crazy
as it may sound). I don't say that it will not be the case at one point
of time, but that would be a different, unrelated change that has
nothing to do with this issue.
Since accessors make sense for more than just indexing by single
numbers, I would consider it imprudent to make the implementation of
vectors depend on special syntax unnecessarily.
--
David Kastrup
- Issue 2072 in lilypond: Add proper complex variables to Lilypond, lilypond, 2011/12/03
- Re: Issue 2072 in lilypond: Add proper complex variables to Lilypond, Keith OHara, 2011/12/03
- Re: Issue 2072 in lilypond: Add proper complex variables to Lilypond, Werner LEMBERG, 2011/12/03
- Re: Issue 2072 in lilypond: Add proper complex variables to Lilypond,
David Kastrup <=
- Re: Issue 2072 in lilypond: Add proper complex variables to Lilypond, Werner LEMBERG, 2011/12/04
- Re: Issue 2072 in lilypond: Add proper complex variables to Lilypond, David Kastrup, 2011/12/04
- Re: Issue 2072 in lilypond: Add proper complex variables to Lilypond, Werner LEMBERG, 2011/12/04
- Re: Issue 2072 in lilypond: Add proper complex variables to Lilypond, David Kastrup, 2011/12/04
- Re: Issue 2072 in lilypond: Add proper complex variables to Lilypond, Werner LEMBERG, 2011/12/04
- Re: Issue 2072 in lilypond: Add proper complex variables to Lilypond, David Kastrup, 2011/12/04
Re: Issue 2072 in lilypond: Add proper complex variables to Lilypond, lilypond, 2011/12/03
Re: Issue 2072 in lilypond: Add proper complex variables to Lilypond, lilypond, 2011/12/09