lua-users home
lua-l archive

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


Peter Hill:
> The disappearance of upvalues and the new lexical scope thing (which I'm
> still coming to grips with)...

Vincent Penne:
> Upvalues have disapeared ? Not in my manual, and I am using them in an
> application written in lua 5 ...

My mistake. I remeber reading something about them no longer being used but
that may have been something on the mailing list a while ago.

They have changed nature, though. I just tried:
    local x=123
    f = function() return %x end
    x=456
    print(f())

Lua4.0 returns 123 as expected, while Lua5.0 doesn't even get past the
definition of "f". It says "global upvalues are obsolete". I need to look
more closely at the new upvalues.

*cheers*
Peter Hill.