Skip to main content

Posts

Featured

  Well, call by name will reduce the first expression without reducing the argument.   So, it would just yield one in a single step, the first argument.   And the variation would stop in a value, obviously.   And a call by value, we have to reduce the arguments to this expression so we have to   reduce loop. And, well, we know that loop reduces to   itself, so we would reduce the arguments. Infinitely often, the whole expression   would always reduce to itself and we would make no progress.   So, that's another example of an infinite loop.   In Scala, we normally use call by value. You might ask, well, given the advantages   of call by name that it terminates more often, why call by value?   Well, it turns out that, for expressions in practice, call by value is often   exponentially more efficient than call by name because it avoids this repeated   recomputation of argument expressions that call by name entails.   Th...

Latest Posts