[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Eliminates pure-print-callbacks list (issue 7300082)
From: |
address@hidden |
Subject: |
Re: Eliminates pure-print-callbacks list (issue 7300082) |
Date: |
Wed, 20 Feb 2013 12:45:02 +0200 |
On 20 févr. 2013, at 11:35, address@hidden wrote:
> On 2013/02/11 17:15:47, dak wrote:
>> On 2013/02/11 17:01:17, mike7 wrote:
>> > On 11 févr. 2013, at 16:29, mailto:address@hidden 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.
>
> Is there a particular reason you ignored this comment, judging from the
> commit you pushed to staging on your own initiative?
I changed the name of the function twice in two successive patch sets to better
reflect what is going on.
Cheers,
MS
Re: Eliminates pure-print-callbacks list (issue 7300082), dak, 2013/02/22