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: NoneSeverity: 3 - Normal
Item Group: CorrectnessStatus: Confirmed
Privacy: PublicAssigned to: None
Originator Name: Open/Closed: Open
Component Version: NoneOperating System: None
Fixed Release: NonePlanned Release: None
Architecture: AllABI: All

Add a New Comment (Rich MarkupRich 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup