Is there something inherently Bad about doing this? for k,v in next, t, #t > 0 and #t or nil do ... end
yes. ipairs stop at the first 'nil', and this code loses all values from there to the '#t'.