Skip to content

Allow Operator overloading and chaining to make SCL more intuitive for technicians

Story

  • At the minute all operators are purely infix
  • We only allow two arguments e.g. 1 + 2 but not 1 + 2 + 3
  • To use multiple arguments, technicians need to use multiple nested brackets 1 + (2 + (3 + 4))
  • We need to fix this by supporting operator chaining
  • Steps that use operators should take a list of steps as arguments
  • This will require a complete rework of all the steps that currently use operators
  • Instead of ApplyMathOperator we will need to have separate methods for each operator (e.g. Sum, Product etc)
  • The same applies for ApplyBooleanOperator and Compare
  • We should also support operator overloading so + could mean Sum, StringConcatenate, or EntityCombine depending on the context

Changelog Summary

  • Removed ApplyMathOperator, ApplyBooleanOperator, Compare
  • Removed with keyword
  • Added Sum, Product, Subtract, Divide, Modulo Power
  • Added And, Or
  • Added Equals, NotEquals, LessThan, LessThanOrEqual, GreaterThan, GreaterThanOrEqual
  • All operators can now be chained
  • + operator can now be used for Sum, StringConcatenate, or EntityCombine
Edited by Mark Wainwright