lua-users home
lua-l archive

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


On Thu, Jun 11, 2015 at 11:15 AM, Christopher Tallman
<cjtallman@gmail.com> wrote:
> To me, this particular syntax doesn't look like a function call. It looks
> more like an rvalue.  For what it's worth, I think I would prefer to reserve
> that syntax for something like wrapping/anonymizing a "method" function. ie:
>
>   local myFunc = self:theirFunc
>
> The above being equivalent to:
>   local myFunc = function(...) self:theirFunc(...) end

Please no! This type of magic is not something that should be
encouraged. The cost of creating the closure is very real and should
not be concealed through syntactic sugar like this.

[https://www.python.org/dev/peps/ is leaking.]

-- 
Patrick Donnelly