Feature SS-4688
1 vote

Different bracket/parenthesis handling of sum(4) and sum(1)

Created by Martin Kraska on 8/11/2023 3:21 PM Last Updated by Martin Kraska on 8/11/2023 9:11 PM
Logged: 0   (hrs)


Proposal: restrict mandatory brackets to cases where the scope of the operator otherwise would be ambiguous. 

Generally, the scope of operators results from their appearance (e.g. square root or the dividing line of a fraction) or from priority rules.

Prefix-operators like sum or product don't need brackets for left side operations, postfix operators like ^ or ! don't need brackets for right side operations.


Minimal solution: make the behaviour of sum(1) and sum(4) equal.

Better solution: enforce brackets if needed for visual unambiguity of scope, don't enforce if not. Yet allow added brackets but don't allow removal of required ones.

Full solution: examin all operators and adjust behaviour if needed.

I guess that this requires metadata on visual ambiguity of an operator to be stored.



There are no comments for this issue.