lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



On May 3, 2014, at 2:38 AM, Thomas Jericke <tjericke@indel.ch> wrote:

local limtied = max(min(input, 1000), 100))
->
local limtied = input : min(1000) : max(100)

Well, I for one would consider that a Con argument, not a Pro. I think most developers regardless of background could read the first example easily. The second would involve considerably more thought. So why is the second form better?

—Tim