[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lilypond-auto] Issue 655 in lilypond: \remove should emit warning f
From: |
lilypond |
Subject: |
Re: [Lilypond-auto] Issue 655 in lilypond: \remove should emit warning for unknown engravers |
Date: |
Sun, 14 Jun 2015 16:35:28 +0000 |
Comment #7 on issue 655 by address@hidden: \remove should emit warning for
unknown engravers
https://code.google.com/p/lilypond/issues/detail?id=655
It took me half an hour (including use of git blame) to understand that in
if (scm_is_eq (tag, ly_symbol2scm ("consists")))
l1 = scm_cons (arg, l1);
else if (scm_is_eq (tag, ly_symbol2scm ("remove"))
&& (scm_is_pair (arg)
|| ly_is_procedure (arg)
|| get_translator (arg)))
l1 = scm_delete_x (arg, l1);
the sole purpose of get_translator was to trigger a warning. I wish this
would have been something like
else if (scm_is_eq (tag, ly_symbol2scm ("remove"))
{
if (!(scm_is_pair (arg) || ly_is_procedure (arg)))
(void) get_translator (arg); // warn if translator class
doesn't exist
l1 = scm_delete_x (arg, l1);
}
which makes clear that get_translator is called mainly (and here even
solely) for its side effect.
Code should be written for human readers. The compiler will complain right
away anyway if there is something it doesn't understand, and it does not
ever need to answer the question "why?" in the first place since it does
not need to maintain the code.
The good news is that I'm making progress on issue 1375.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Lilypond-auto] Issue 655 in lilypond: \remove should emit warning for unknown engravers,
lilypond <=