
2 Jan
2009
2 Jan
'09
11:47 p.m.
2009/1/3 Conal Elliott
Are there other thoughts & insights about the source of the idea that "everything is a function"?
Lazy evaluation can make values seem like functions, given that laziness can be modeled in a strict imperative language by 0-argument functions. Also, in an uncurried language, decreasing the number of arguments to a function, still keeps it a function, eg foo(int a, int b); // 2 arguments foo(int a); // 1 argument foo(); // 0 arguments, but still a function In a strict language, there is a distinction between 0-argument functions and values; there isn't in Haskell, but it is still nice to maintain the idea of "0-argument functions" in Haskell -- which are just values. Cheers, Reiner