[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Minimizing repeatable statements with out LuaMacro
- From: Ico <lua@...>
- Date: Mon, 20 Jun 2011 18:06:16 +0200
* On Mon Jun 20 17:12:48 +0200 2011, James Graves wrote:
> PROXiCiDE <saiyuk7@gmail.com> wrote:
>
> > thank you for your response and implementation, can you tell me the difference
> > between this and the loadstring implement?
>
> The table of functions is generally better, in my view. It doesn't
> involve on-the-fly code compilation, so it should be faster. And it
> is more secure and easier to maintain. You don't want to just load
> any arbitrary code and run it, especially if those strings can be
> somehow input by a user.
Indeed, I agree with all of the above; you should consider using the
table variant instead of my earlier loadstring() solution.
--
:wq
^X^Cy^K^X^C^C^C^C