lua-users home
lua-l archive

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


On 04/07/2011 22.41, Roberto Ierusalimschy wrote:
This way of removing functions might not be ideal:

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

The reason is that to test whether a function exists, it is not as simple as

   if io.popen then ..... end

[...]

On the other hand, I guess this message may be very useful for people
changing from 5.1 to 5.2. (Not people from the list, who has been
discussing the changes for a long time, but many (most?) programmers
not aware of all changes...)

-- Roberto



I see, but wouldn't it be better a detailed feature changelog, i.e., not a plain diff, but an annotated list with likely gotchas?

I understand that this would be an added documentation burden for you, but on the other hand it will contribute to clean up Lua codebase from less useful tests (IMHO) (and, in perspective, will save you to remove those tests in a future 5.3 release).

-- Lorenzo