bugText Extractor TXR - Bugs: bug #34659, Extra arguments in Filter...


bug #34659: Extra arguments in Filter Functions are evaluated multiple times.

Submitted by:  Kaz Kylheku <kkylheku>
Submitted on:  Wed 26 Oct 2011 04:35:52 AM UTC  
Category:  None Severity:  3 - Normal
Item Group:  Correctness Status:  Confirmed
Privacy:  Public Assigned to:  None
Originator Name:  Open/Closed:  Open
Component Version:  None Operating System:  None
Fixed Release:  None Planned Release:  None
Architecture:  All ABI:  All

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Wed 26 Oct 2011 04:35:52 AM UTC, original submission:  

The filter function extra arguments are handled in a fexpr-like way (ancient Lisp terminology). They are treated as source code, and evaluated as many times as the filter is called. They should be evaluated once, at the time the filter expression is reduced to a filter, and only the resulting values captured.

This is not entirely trivial because the v_fun function itself is a special operator that expects unevaluated forms. Double evaluation would be even more wrong.

One hack is to create some gensyms and bind the evaluated
argument values to them in the binding environment, and pass the
gensyms instead of the original arguments.

Kaz Kylheku <kkylheku>
Project Administrator


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by kkylheku (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.5