unused opt-callback in trunk/src/report/utility-reports/view-column.scm

Derek Atkins warlord at MIT.EDU
Tue Jul 18 09:51:55 EDT 2006


Larry Evans <cppljevans at cox-internet.com> writes:

> On 07/17/2006 09:31 AM, Derek Atkins wrote:
>> Larry Evans <cppljevans at cox-internet.com> writes:
>>
>>>The variable, opt-callback, is declared (line 121)
>>>but not used anywhere in the code.
>> It happens.  What about it?  It might be there just as a reminder
>> that
>> it exists when someone is looking at the report.  There's no harm
>
> Anyone looking at the screen (I assume that's what you mean by "looking
> at the report") would see it; hence, I don't know why they would need
> a reminder that it exists.

No, I meant "looking at the code".  I meant anyone looking at the
foo.scm file could see that the callback arg is the caddr (or whatever
it is).

>> in defining it but not using it.
>
> It's distracting when one's trying to figure out how the report
> works. I was looking for a place to disable the callback for
> some subreports; so, I searched for "callback".  Of course I found
> this variable but then also found it's not used.  Although it's
> a minor distraction, it is one and it's not needed, AFAICT.

*shrugs*

I'm sorry it confused you.  But I think it's okay (and a GOOD IDEA)
to parse out a list into its components even if you don't use every
component of the list.  It lets future developers understand it, and
one day a future developer may want to use that callback.  If it were
removed they'd have to go back to the beginning and figure out how
the callback is passed in.

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list