Lazy evaluation
See original GitHub issueSo if I use the and
helper like so;
{{if (and firstExpression secondExpression)}}
It will evaluate both firstExpression
and secondExpression
even if firstExpression
is false.
Is there a way to get it to evaluate just the firstExpression
and stop there when it fails? The reason I ask is because 99% of the time my secondExpression
is not necessary, and is quite taxing, so I only want to evaluate it when necessary.
I am trying to do this with ember-truth-helpers because both of my expressions are actually handlebar helpers :p
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
Lazy evaluation - Wikipedia
In programming language theory, lazy evaluation, or call-by-need, is an evaluation strategy which delays the evaluation of an expression until its value is ......
Read more >Functional Programming - Lazy Evaluation - Tutorialspoint
Lazy evaluation is an evaluation strategy which holds the evaluation of an expression until its value is needed. It avoids repeated evaluation.
Read more >What is Lazy Evaluation? — Programming Word of the Day
When a compiler encounters an expression, usually it tries to evaluate it. Evaluation is the process of getting the root meaning of a...
Read more >What is Lazy Evaluation in Python? | by Xiaoxu Gao
If you've never heard of Lazy Evaluation before, Lazy Evaluation is an evaluation strategy which delays the evaluation of an expression ...
Read more >Scala | Lazy Evaluation - GeeksforGeeks
Lazy evaluation or call-by-need is a evaluation strategy where an expression isn't evaluated until its first use i.e to postpone the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sure, but definitely is annoying 😄
I guess in theory this would be an alternative approach to achieve lazy evaluation;