Just fixed an error with array[count++]= foo(); where foo() modified count, in effect writing stuff into the incorrect location.
Haskell's lazy evaluation would have prevented that.
Name:
Anonymous2014-07-15 2:22
Function application is relatively expensive on conventional computers. The principle reason is the complexity of maintaining the data structures that support access to the bound identifiers. The problems are especially severe when higher-order functions are permitted. Because a formula of the SKI calculus contains no bound identifiers, its reduction rules can be implemented as simple data structure manipulations. Further, the reduction rules can be applied in any order, or in parallel. Thus it is possible to design massively parallel computers (graph reduction machines) that execute functional languages efficiently.
Then why aren't we using the SKI calculus everywhere?