lua-users home
lua-l archive

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


> o Is there a reason this idea [1] was scrapped?

goto is more flexible and easier to write than break with labels (which
usually demand a new block to add a label).


> o Also, since load is currently the only mechanism to set the _ENV
> upvalue without using the debug API, I'd like to see a generator for
> compiled chunks that let you set the _ENV upvalue:
> 
> function _main (_ENV)
>   return function (...)
>      --[[ chunk ]]
>   end
> end

Doesn't that seem too specific? ("A mechanism to set the _ENV upvalue of
binary chunks without using the debug API.") What is wrong with using
the debug API for this very particular case?

-- Roberto