On Mon, Aug 23, 2010 at 5:41 PM, RJ Russell <
russellsprouts2@gmail.com> wrote:
> In 5.1 the manual says that
> function name()
> end
> is equivalent to
> name=function()
> end
>
> It confused me quite a bit when that didn't hold true in table constructors.
> I propose allowing this in a table constructor.
>
> {function name()end}
> rather than
> {name=function()end}
>
> and possibly even this
> {function[anyvalue]()end}
> rather than
> {[anyvalue]=function()end}
>
> There is no ambiguity, it looks nicer (to me), and it follows the
> principle of least surprise, because it follows the rest of the
> language.
>
> That would be a simple addition to the language.
If it's important to me, I prefer to just use "function table.method()