[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [PROPOSAL] [PATCH] simple method call
- From: Patrick Donnelly <batrick@...>
- Date: Thu, 11 Jun 2015 13:11:31 -0400
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