Issue Details (XML | Word | Printable)

Key: JEXL-12
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Matthew Firth
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons JEXL

[JEXL] Implement short-circuit boolean evaluation

Created: 14/Jun/04 03:36 PM   Updated: 09/Aug/06 04:33 AM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File short-circuit-eval.patch 2004-08-17 05:24 PM Matthew Firth 2 kB
Environment:
Operating System: All
Platform: All

Bugzilla Id: 29550


 Description  « Hide
The current implementation of ASTAndNode and ASTOrNode will evaluation both
sides of an expression before returning a result. I think most developers
these days seem to expect the RHS of an AND/OR expression to be ignored if the
LHS is sufficient to determine the result
(e.g. if A=>true, "A or B"=>true, regardless of B).

The patches appear to be trivial - if a committer is interested & thinks it
worthwhile I'll create them.

(btw, the old Turbo Pascal compiler described this optimisation as "short
circuit boolean evaluation"; I'm not sure if that is a common name for it.)



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Henri Yandell made changes - 16/May/06 09:42 AM
Field Original Value New Value
issue.field.bugzillaimportkey 29550 12341509
Henri Yandell made changes - 16/May/06 11:39 AM
Component/s JEXL [ 12311119 ]
Affects Version/s Nightly Builds [ 12311648 ]
Project Commons [ 12310458 ] Commons JEXL [ 12310479 ]
Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
Key COM-1357 JEXL-12
Henri Yandell made changes - 16/May/06 12:24 PM
Affects Version/s Nightly Builds [ 12311794 ]
Rahul Akolkar made changes - 09/Aug/06 04:33 AM
Affects Version/s Nightly Builds [ 12311794 ]
Fix Version/s 1.0 [ 12311740 ]
Bugzilla Id 29550