Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

expr-lang playground shows incorrect "Explain" for expressions #706

Unanswered
rchougule asked this question in General
Discussion options

expr-lang supports short-circuiting of expressions. Though, the playground seems to be depicting otherwise.

For e.g.,

  1. true || functionCall()
  2. 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
image
  • Correct Bytecode though
image
You must be logged in to vote

Replies: 1 comment 3 replies

Comment options

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.

You must be logged in to vote
3 replies
Comment options

Thanks a lot!

Comment options

Hi @antonmedv, just reaching out to check on when are we planning to enable this.
Thanks!

Comment options

Hey, yes. This already implemented in Expr Pro. I have plans to deploy this to Expr Playground this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /