lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: report a programming error when trying to align on empty parent (iss


From: Janek Warchoł
Subject: Re: report a programming error when trying to align on empty parent (issue 7533046)
Date: Thu, 21 Mar 2013 13:21:30 +0100

On Thu, Mar 21, 2013 at 9:14 AM,  <address@hidden> wrote:
> On 2013/03/21 08:04:42, janek wrote:
>
>> So, you think that we shouldn't report any programming error in these
>> alignment funcitons since an empty extent doesn't prevent us from
>> doing our job i.e. aligning)?
>
> Well, with an empty extent it would appear our job of aligning
> _self_ is already done before we even start.

yes, in a way.

>> (i'm just asking to make sure that i understood you correctly)
>> If so, i'll just delete all these error reports - fair enough for me.
>
> For me the problem only starts once one tries aligning a non-empty
> construct to an empty one.  For _that_ we need a coping strategy.

Not quite.  I mean, grob's parent must exist (even if its extent is empty),
and if the extent is empty, we can just return 0 offset.

> That strategy might in some cases warrant flagging an error, in other
> cases it might warrant escalating to aligning on the empty construct's
> parent instead.

Hmm.  Maybe, but no example comes to my mind.

> I don't know the logic of the code and its uses, so this is basically my
> unqualified gut feeling and nothing else.  Flagging and reporting a
> "problem" without any user-visible consequences does not appear helpful
> to me.  What is the user or programmer supposed to do?
>
> Whether my characterization is accurate, I don't know either.  If it
> isn't, function name and warning message could possibly be made more
> informative.

It is telling that (presumably after looking at the code at least
once) you don't know what the logic of the code is.  I find the naming
quite confusing indeed.
Please take a look at this comment with which i hope to explain the
idea of the code and its uses (you can see an older and newer version
here):
https://codereview.appspot.com/7768043/diff2/19001:25001/lily/self-alignment-interface.cc
maybe it'll help you.
I'll also write some more complete explanation and send it to the list.

best,
janek



reply via email to

[Prev in Thread] Current Thread [Next in Thread]