lua-users home
lua-l archive

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



IMO, stack level parameter is a problem in 'error', not in getfenv/setfenv.
I think a solution to both is to have a way to mark current stack level as 'skip me'. It can be stored in CallInfo structure. Functions like pcall should set this flag.


On 19.01.2010 10:56, Mark Hamburg wrote:
On Jan 18, 2010, at 8:37 PM, David Manura wrote:

This is arguably one of the strongest arguments for the dynamic scoping proposal. in-do-end already deals with one of the chief reasons to use a stack level index in setfenv. Dynamic scoping would deal with one of the chief reasons to do an indexed getfenv.

Mark




--

___________________________________________
Best regards,
Sergey Rozhenko                 mailto:sergroj@mail.ru