lua-users home
lua-l archive

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


On 06-04-2012 01:51, krunal.rao78@gmail.com wrote:
Subject: Re: Slicing ideas

But with this you cannot set :p

KR

One solution would be to have a __newcall metamethod that is called when you assign to a function call:

t(1,2,3) = foo -> __newcall(t,foo,1,2,3)

It looks a little funny though, but after all Ada lives well with having () for both indexing and function calls.


--

Thomas