On 8/23/11 12:21 PM, "ianhuli...@gmail.com" <ianhuli...@gmail.com> wrote:

> LGTM
> 
> Maybe we should have some GOP rules for C++ about this?
> "Only have multiple exit points from routines if you absolutely have to.

Multiple exit points is a standard idiom of the LilyPond code.  Basically,
the idiom is "If this routine doesn't apply for some reason, leave now",
instead of "If this routine doesn't apply, skip to the end" or "If this
routine applies, do the body".

As imbedded as this idiom is in our code, I don't think it would be wise to
change it.

> Make sure any output parameters are declared and initialized at the top
> of a routine so that however a routine exits, they are left in a defined
> state"

IIRC, we used to have a statement that said to declare variables as close as
possible to where they are used.  I generally agree with that.

However, I think a simple statement that says "variables should be
initialized when they are declared" would be clearly welcome.  And fixes to
the code to ensure this would also be welcome.

Thanks,

Carl


_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to