lua-users home
lua-l archive

Re: what to make of this fellow named __ipairs?

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


On Fri, Jan 28, 2011 at 18:50, Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
>> On Fri, Jan 28, 2011 at 16:52, Tony Finch <dot@dotat.at> wrote:
>> > On 2011年1月28日, joao lobato wrote:
>> >> What about the case when wants to discover the method name at runtime:
>> > It may be worth allowing obj:[method](args)
>> I certainly miss this feature often. Is it hard to implement?
> Just write obj[method](obj, args).
Well, I know that, thanks.
I miss obj:[method](args) when obj is an expression (say, a function
call). I have to create a temporary variable then, and it is a bit
ugly.
Nothing serious, of course, but obj:[method](args) looks more
aesthetically pleasing to me...
Alexander.

AltStyle によって変換されたページ (->オリジナル) /