[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Type Metatables for Table and Userdata - Powerpatch
- From: Sven Olsen <sven2718@...>
- Date: Thu, 6 Dec 2012 23:20:21 -0800
foreach k,v in t --> for k,v in pairs(t)
Or maybe turn it into a value iteration shorthand:
foreach v in t --> for _,v in pairs(t)
Iterations that ignore keys are something that I do use quite a bit in my own code. "for k,v in pairs(t)" isn't really that bad, as boilerplate goes, but "for _,v in pairs(t)" is pretty awkward.