[Top][All Lists]

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

Re: pushproperty syntax

From: Han-Wen Nienhuys
Subject: Re: pushproperty syntax
Date: Fri, 20 Oct 2000 18:17:36 +0200

address@hidden writes:
> Has the type checking of the property values disappeared
> not that generic-property is broken?

generic-property is not broken. It merely prints a warning message to
motivate people to use the new syntax.

> I think the current trend of the syntax development is to 
> make Mudela more and more cryptic to people who don't have
> a degree in computer science (I have one so I shouldn't complain).

(and I myself don't have one ... )

> From the warning messages of the latest Lilypond version, 
> it seems that you plan to remove the old property syntax 
> completely. 

No, that's not entirely true. The deprecated properties are those that
were funneled directly into the backend using generic-property.scm and
Property_engraver. By using \push and \pop there is no need for the
memory-wasting and CPU-using Property_engraver.

One problem is that the typechecking in the backend is not very
strict, so we have to be more careful. Right now, you can easily crash
lily if you \push a property of an incorrect type. That will have to
be addressed by reworking the backend code.

> However, the change in 1.3.94 was a step in the right direction
> since it reduced the number of keystrokes. Still, why use the
> concept "push" and "pop" in the syntax. Why not replace \property
> Voice.Dots \push #'direction = #-1 with, for example, \addproperty
> Dots= #-1 \to Voice or \addproperty Voice.Dots = #-1 The
> corresponding for \pop could be \removeproperty

\addproperty and \removeproperty increase the number of reserved
words. I'm a little reluctant to do that. Secondly, what you're doing
is really changing the value of an engraver property, so to me,
overloading \property reflects the way it works. Your proposal looks a
lot like the prototype syntax (\pushproperty).

If we're going to change the naming, I'd propose "override" and
"revert" as words, because I think they describe better what is

One gripe that Jan vented to me privately is that it is too easy to
make errors with balancing \push and \pop. His proposal was to add
another construct called \replace, \assign, \set etc., eg.

        Voice.Stem \replace #'direction = #-1

that does a \pop and then a \push. A disadvantage is that you have to
explicitly retype the default, and you still need a \pop if there was
no default to begin with.


Han-Wen Nienhuys   |   address@hidden    |

reply via email to

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