lua-users home
lua-l archive

Re: Popularity contest

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


steve donovan <steve.j.donovan <at> gmail.com> writes:
> 
> 2011年9月26日 Artur Galyamov <artur-pub <at> yandex.ru>:
> >     local min, max, floor in math
> >
> > No new keywords there. I think it would be nice way to easily localize
globals.
> 
> Yes, it's convenient. I agree with Dirk actually that it's not worth
> adding new keywords for this convenience, but it _is_ less ugly than
> the full version.
> 
> steve d.
I think this proposal is quite convenient. At the moment I do something like:
local min, max, sin, cos = ridx(math, "min, max, sin, cos")
which allows me to copy&paste lhs to rhs to minize typing errors.
I also like to proposal to have obj:f returns a closure with "binded" self
argument. I actually thought about this proposal before reading it here, but
I guess it's not that hard to immagine :P
KR

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