You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today a guard can check an inequality. For example, the message {"temp":10} matched against {"temp":"?t"} results in a binding {"?t":10}, which a guard can contemplate based on (say) t<12.
The suggested new feature has two forms.
Support pattern variables of the form "?<X" and "?>X". When given a binding for ?X, one of those patterns matches if the respective inequality is true.
Support pattern variables of the form "?<CONSTANT" and "?>CONSTANT", where CONSTANT is a constant literal (a number or string). A match would not extend the pattern matching bindings.
In both cases, also support <=, >=, and ! (which means "not equal").
Since the above behavior can be accomplished with guards, this new behavior isn't necessary. However, possible gains in efficiency and conciseness seem to justify these special cases. (As an example, this feature would make dealing with out-of-order messages much easier.)
The text was updated successfully, but these errors were encountered:
Today a guard can check an inequality. For example, the message
{"temp":10}
matched against{"temp":"?t"}
results in a binding{"?t":10}
, which a guard can contemplate based on (say)t<12
.The suggested new feature has two forms.
Support pattern variables of the form
"?<X"
and"?>X"
. When given a binding for?X
, one of those patterns matches if the respective inequality is true.Support pattern variables of the form
"?<CONSTANT"
and"?>CONSTANT"
, whereCONSTANT
is a constant literal (a number or string). A match would not extend the pattern matching bindings.In both cases, also support
<=
,>=
, and!
(which means "not equal").Since the above behavior can be accomplished with guards, this new behavior isn't necessary. However, possible gains in efficiency and conciseness seem to justify these special cases. (As an example, this feature would make dealing with out-of-order messages much easier.)
The text was updated successfully, but these errors were encountered: