[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Unnecessary New Closures
- From: "Evan DeMond" <evan.demond@...>
- Date: Thu, 6 Sep 2007 14:05:44 -0400
Veering off topic slowly but surely, but I suppose the way I would approach that is to give the comparison function a descriptive name. LessThan, GreaterThan, or the like, and maybe keep it in the global scope. Then you could justify it by calling it a "predicate." =) I wouldn't call that inelegant.
On 9/6/07, Patrick Donnelly <batrick.donnelly@gmail.com> wrote:
I see now thanks. Perhaps an inline function addition would be nice,
though it seems to be an almost distasteful addition. I just find
these constructs inelegant:
local x = function(a, b) end
function sort()
table.sort(sometable, x)
end
--
-Patrick Donnelly
"One of the lessons of history is that nothing is often a good thing
to do and always a clever thing to say."
-Will Durant