lua-users home
lua-l archive

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


pairs() is considered harmful, and can cause bugs: https://github.com/MightyPirates/OpenComputers/issues/1625

Now, `for k, v in next, t do` is a bit less clear than `for k, v in pairs(t) do`, so my proposal is that we get a built-in rawpairs(), as `for k, v in rawpairs(t) do` is clear, and it'd be good for new users to not be confused when they see it but it fails on their interpreter with "attempt to call nil".

--
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.