Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

agdgdgdgwngo

  • 3 years ago

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

  • This Question is Closed
  1. michealwwells
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    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.

  2. arcticf0x
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 2

    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?

  3. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy