|
On Dec 14, 2013, at 11:55 PM, Sir Pogsalot <sir.pogsalot@gmail.com> wrote:
Agreed .. as noted elsewhere to get true “pure” functions requires additional constraints (see Haskell if you really want an example). My point was that “purity” here can be stretched based on domain-specific knowledge. In effect, a cache (even a hardware cache) is a type of memorized function, though with some special characteristics, and of course we all try to cache network stuff. FWIW, I don’t think it is possible to create a useful generic memorized function in Lua .. if it’s truly generic it is going to be so complex (=slow) that I doubt its usefulness. —Tim |