Ask your own question, for FREE!
Computer Science 24 Online
OpenStudy (anonymous):

For what types of procedures would lazy evaluation semantics have an advantage over strict? In what cases is strict evaluation better than lazy evaluation?

OpenStudy (anonymous):

I think it's generally a performance thing. Why waste cpu cycles if you don't have to? The best example I can think of is an if statement. The else isn't evaluated unless the if condition is true. When should strict be used? I'll take a shot in the dark here but I'm guessing compilers do some strict evaluation semantics to pick up potential errors.

OpenStudy (anonymous):

Lazy evaluation includes performance increase, avoiding error conditions in evaluation of compound expressions, reduction in memory footprint and the best one, the capability of constructing potentially infinite data structures (so my book says). While strict evaluation eliminates the need to track and schedule the evaluation the evaluations expressions and allows the programmer to dictate the order of execution. Are into learning functional programming by any chance?

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!