On Fri, Aug 31, 2012 at 11:11:28PM -0300, Han-Wen Nienhuys wrote:
> I have become convinced that optional, unnamed arguments are not a
> happy design decision, in any language. In Lily it's particularly
> problematic, since we don't group function parameters.
I agree; it's a mess. Let's examine David's most hated example:
\version "2.15.0"
{
\tempo 4 = 60
c1 c
\tempo 4. = 60 ~ 72
c1 c
\tempo "Andante"
c1 c
\tempo "Allegro" 4 = 120
c1 c
\tempo "Allegro" 4 = 120 ~ 144
c1 c
\tempo \markup{ Presto } 4. = 172 ~ 188
c1 c
}
What are the options here?
1) use explicit delimiters for function arguments
(i.e. \tempo {...})
2) add a "non-argument" like \default for all parameters which are
not needed
3) define different function names, i.e. \tempoNumber,
\tempoNumberRange, \tempoText, \tempoTextNumber...
NB: I am not suggesting that all or any of those ideas are good;
I'm just trying to list the options that I can think of.
- Graham
_______________________________________________
lilypond-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-devel