Dan Eble <dan@lyric.works> writes:

> Are there any potential drawbacks to allowing music functions to
> return *unspecified* and having the infrastructure map it to
> (make-music 'Music)?
>
> The main advantage is that something like
>
>     (if condition
>         (begin
>          ...
>          ...)
>         (make-music 'Music))
>
> could instead be written
>
>     (when condition
>       ...
>       ...)
>
> I believe that this can be done; I'm asking whether there is any
> reason that it shouldn't be done.

I think it is a bad idea.

In general #*unspecified inside of a music expression is elided.
(make-music 'Music) isn't.  It prints under \displayMusic, it takes
articulations.  It has non-trivial side effects and should not be
silently inserted for what may likely be lackadaisical coding without a
clear idea of what is happening.

-- 
David Kastrup

Reply via email to