lua-users home
lua-l archive

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


On Fri, Oct 28, 2011 at 9:28 AM, Miles Bader <miles@gnu.org> wrote:
> HyperHacker <hyperhacker@gmail.com> writes:
>> funcs['for'] = function(...) doStuff() end --OK, but harder to read,
>> especially alongside those like the first line.
>
> c'mon, that's not _that_ bad, especially given that it will only
> rarely need to be used.  It's arguably even a good thing, since it
> explicitly makes the point "hey this function name is a keyword, so be
> careful..."

Yeah, it sounds really smart to use "for" as a function name in your
Lua code :-))

(Hilarity ensues!)

Stefan