Thomas Morley <[email protected]> writes: > 2012/11/12 David Kastrup <[email protected]>: >> Thomas Morley <[email protected]> writes: >> >>> c) >>> The functions above are using two optional arguments. >>> And I'm able to omit both optional arguments or the second. >>> But I can't omit only the first. >>> Why? > [...] >> I am pretty sure that "Extending LilyPond" describes this, though >> probably without giving the rationale for it. > > I should really reread the docs from time to time, refreshing my memory.
Well, it is mostly a design question and thus not cast in stone, but it seemed like the most consistent and useful behavior creating a coherent design for dealing with \default, its preexisting uses, optional arguments, and the consideration that skipped optional arguments should not be ending up in completely different expressions or function calls. I don't think that the type-based optional argument mechanism can be extended much beyond this point without getting more ambiguities and quirks than actual use cases. -- David Kastrup _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
