On 2013/02/11 17:01:17, mike7 wrote:
On 11 févr. 2013, at 16:29, mailto:d...@gnu.org wrote:

> scm/output-lib.scm:61: (define-public pure-safe-stencil-height
> Perhaps add any information about the name?  Its name claims to
produce
> a pure value, but it actually outputs callbacks both for pure and
> unpure.  What makes it "safe"?

maybe unpure-pure-stencil-height is better?

Its effect would presumably be a callback that is not replaced by its
value when called.  Correct?  All that pure/unpure whatever is just
waving internals around for a concept that has little to do with it.

I'd use something like
(ly:retriggerable-callback ly:grob::stencil-height)
for that, and since you use it a whole lot of time and presumably don't
want to have one closure per use, you can use something like

(define ly:grob::retriggerable-stencil-height
  (ly:retriggerable-callback ly:grob::stencil-height))

once in a useful location and then use that.  Your coding style only
ever shows mechanisms, not concepts.  That makes the code about as
pleasant and easy to read as disassembled machine code.  I am not sure I
got the concept right here: that's your job.  Not that of the reader or
reviewer.

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

Reply via email to