-
-
Notifications
You must be signed in to change notification settings - Fork 463
-
expr-lang supports short-circuiting of expressions. Though, the playground seems to be depicting otherwise.
For e.g.,
- true || functionCall()
- functionCall() || true
In both these cases, the functionCall() is not invoked actually when tested. But when looked at playground, it seems to Explain in a way that it does.
- Incorrect Explain
- Correct Bytecode though
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 3 replies
-
Yes, this is "by design". In the explain more, Expr will evaluate both branches. I guess this is not intuitive behavior. I will turn on short-circuting by default in explain.
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions
-
Hi @antonmedv, just reaching out to check on when are we planning to enable this.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions
-
Hey, yes. This already implemented in Expr Pro. I have plans to deploy this to Expr Playground this week.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1