[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Proposal: change Grob.id to Grob.output-properties
From: |
Carl Sorensen |
Subject: |
Re: Proposal: change Grob.id to Grob.output-properties |
Date: |
Fri, 16 Sep 2016 00:58:23 +0000 |
User-agent: |
Microsoft-MacOutlook/14.6.7.160722 |
On 9/15/16 6:37 PM, "lilypond-devel on behalf of Paul"
<address@hidden on behalf of
address@hidden> wrote:
>
>Looking at the code, the changes seem pretty straightforward to do.
>Assuming we agree this is a good improvement to make, the question I
>have is about migrating existing user files to the new property.
>Literal strings are easy enough to handle with convert-ly: = "abc"
>converts to = #'((id . "abc"))
Yes -- this looks good to me.
>
>The problem is when users have assigned a procedure (that returns a
>string) to this property, which is surely a common use case. I don't
>see a reasonable way to handle that with convert-ly. Maybe it is
>possible but seems like it would get ugly.
Just use a can't convert rule; have the user do the conversion.
>
>So we could make the new property's type be "string-or-list?". (We'd
>have to define that predicate.) Then for strings, output a deprecation
>warning, but go ahead and handle the string as the user expects. That
>would give users time to rewrite their code and then at some future
>point we change the type to just "list?" and only support alist values.
I think that using string-or-list? would make future code unnecessarily
complicated. We should make the change once, rather than dragging it out
for years.
Let's just face the pain once.
Thanks,
Carl