lua-users home
lua-l archive

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


On Tue, Jul 5, 2011 at 00:19, David Manura <dm.lua@math2.org> wrote:
> On Mon, Jul 4, 2011 at 3:40 PM, Luiz Henrique de Figueiredo
> <lhf@tecgraf.puc-rio.br> wrote:
>> Lua 5.2.0 (beta-rc5) is now available [...]
>>        - clarifications between 'deprecated' and 'removed'

> This way of removing functions might not be ideal:

I second this.

>  stdin:1: 'popen' not supported
>  stack traceback:
>        [C]: in function 'popen'
>        stdin:1: in main chunk
>        [C]: in ?

While this one *may* be justified...

>  > setfenv(function()end, {})
>  stdin:1: deprecated function
>  stack traceback:
>        [C]: in function 'setfenv'
>        stdin:1: in main chunk
>        [C]: in ?

...This one, IMO, makes no sense. If it is deprecated, it must work.
Otherwise it is removed (and replaced with nonsense stub).

My opinion is that there must be a clear way to programmatically
determine a capability list of the given Lua interpreter. The best way
to do this — is to actually *remove* removed functions.

Uninitiated Lua 5.2 users would google up the "setfenv, attempted to
call a nil value" (or whatever) error message, and would get the
reason why this happens and what to do on the first hit. (One way to
guarantee this — is to create a quality set question+answer pairs on
the subject on StackOverflow.)

My 2c,
Alexander.