[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: unpack and table.unpack
- From: Choonster TheMage <choonster.2010@...>
- Date: Thu, 17 Oct 2013 01:36:41 +1100
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.