lua-users home
lua-l archive

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


On 17 October 2013 01:04, Javier Guerra Giraldez <javier@guerrag.com> wrote:
> On Wed, Oct 16, 2013 at 1:31 AM, Choonster TheMage
> <choonster.2010@gmail.com> wrote:
>> If you're writing for 5.1 and 5.2, you can use `local unpack = unpack or
>> table.unpack` at the top of the file and then call it as `unpack`.
>
>
> i'd slightly prefer to do:
>
> table.unpack = table.unpack or unpack
>
> to be forward-compatible instead of backward
>
> --
> Javier
>

That's probably a good idea if you're writing an application or
script, but if I was writing a library I'd be hesitant to make any
global changes to the standard library functions.