[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use aligned-on-x-parent instead of other callbacks for some grobs (i
From: |
dak |
Subject: |
Re: Use aligned-on-x-parent instead of other callbacks for some grobs (issue 127860043 by address@hidden) |
Date: |
Wed, 20 Aug 2014 08:50:55 +0000 |
On 2014/08/18 06:09:44, janek wrote:
As far as i can see, the code for getting non-boolean properties
follows the
convention:
Type value = robust_scm2type (grob->get_property("prop-name"),
default)
When writing code for issue 2245, I have initially tried to use
robust_scm2bool
- which didn't exist.
And it's pointless since unset options are #f by default and convention.
Somewhat irritatingly, separately to to_boolean there _does_ exist a
ly_scm2bool (which is equivalent to scm_is_true and thus defaults to #t
(!) when given a non-boolean). It is used a few times in our code base.
Most of the uses should likely be replaced by to_boolean, some
conceivably by scm_is_true. And afterwards, all instances of to_boolean
should be renamed to ly_scm2bool and the behavior of _that_ changed to
be that of to_boolean.
As i was not aware of to_boolean, i ended up with
ly_scm2bool, which turned out to be a bad choice.
So, my question is: can we do something to make this more intuitive?
The most important answer to that question in this context is: not as
part of *this* issue. Please use to_boolean here. I remember being
tripped up by ly_scm2bool at some point of time in the past. I'm
definitely sympathetic to changing its behavior to that of to_boolean
and getting rid of to_boolean altogether (after making sure that all
current uses of ly_scm2bool are mapped to the most appropriate of either
to_boolean behavior under the guise of "new ly_scm2bool" or to
scm_is_true). But not intermingled with this issue, and most certainly
not half-intermingled with this issue.
https://codereview.appspot.com/127860043/
- Use aligned-on-x-parent instead of other callbacks for some grobs (issue 127860043 by address@hidden), k-ohara5a5a, 2014/08/10
- Re: Use aligned-on-x-parent instead of other callbacks for some grobs (issue 127860043 by address@hidden), k-ohara5a5a, 2014/08/18
- Re: Use aligned-on-x-parent instead of other callbacks for some grobs (issue 127860043 by address@hidden), janek . lilypond, 2014/08/18
- Re: Use aligned-on-x-parent instead of other callbacks for some grobs (issue 127860043 by address@hidden),
dak <=
- Re: Use aligned-on-x-parent instead of other callbacks for some grobs (issue 127860043 by address@hidden), janek . lilypond, 2014/08/27
- Re: Use aligned-on-x-parent instead of other callbacks for some grobs (issue 127860043 by address@hidden), dak, 2014/08/29
- Re: Use aligned-on-x-parent instead of other callbacks for some grobs (issue 127860043 by address@hidden), pkx166h, 2014/08/30
- Re: Use aligned-on-x-parent instead of other callbacks for some grobs (issue 127860043 by address@hidden), dak, 2014/08/30