[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: deprecating 'for x in t'
- From: Lucas Ackerman <glitch@...>
- Date: Mon, 1 Nov 2004 12:43:56 -0500
>> How deprecated is the 'implicit pairs()' case anyways? I'm using it
>> throughout - should I change my habits? 0:)
>Yes. There is a good chance of it not being present in 5.1 final.
I would like to see this resolved as well. Either officially kill it,
give a compiler option to dissallow it (probably not good to fragment the
language base), or make it syntactic sugar for 'for x in pairs(t)', so
that it always goes through the pairs function. The latter option is my
preference, as it allows us to override the default table iteration in a
clean way, short of the metatable __pairs ideas (which of course don't
address the basic 'for' issue for regular meta-free tables).