lua-users home
lua-l archive

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


On Thu, May 15, 2008 at 9:38 PM, Norman Ramsey <nr@eecs.harvard.edu> wrote:
>  > I would move the metatable construction outside memoize because it
>  > never changes.
>
> I understand the impulse, but since I'm already allocating a table at
> every call, I don't mind allocating a second table at every call.
>
>  > You could also [use the __index metamethod instead of testing for nil]
>
> I like this idea; I hope my colleague will like it as well.

Yes, I like it too. Nice idea  :-)

-- 
Fidelis Assis