Idioms to make Lua a bit saner for certain operations