, (or) operator in loan rule engine

Description

The “or” connector/operator (a comma) is used to "add a new rule to match the same policy" (loan-rules-updated26.pdf page 11 in loan-rules-ux-iteration-4.zip https://discuss.folio.org/t/loan-rules-ux-iteration-4/834 ).

Example (from page 4):
m book cd dvd , t special-items : in-house
This is the same as
m book cd dvd : in-house
t special-items : in-house

I propose not to implement this "or" operator at all.

a) It is difficult to read (usability) because it is likely that humans overlook the comma when skim-reading the rules.

b) Precedence: What is the precendence when combining "and" operator and "or" operator in a line?
m book cd dvd , t special-items + g visitors
can be
(m book cd dvd , t special-items) + g visitors
or
m book cd dvd , (t special-items + g visitors)
Solving the precendence problem makes the syntax more difficult: additional syntax like braces, restrictions like forbidding the combination of both operators, giving one of the operators higher precendence is a well known source of coding errors in programming languages.

c) Do the number and relevance of the uses cases where two lines should be joined into a single "or" operator line justify the introduction of the "or" operator?

Environment

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Julian Ladisch August 8, 2017 at 8:33 AM

Issue moved to Resource Access SIG to let them decide.

Details

Assignee

Reporter

Priority

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created August 8, 2017 at 8:25 AM
Updated November 6, 2017 at 4:32 PM
TestRail: Cases
TestRail: Runs