[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Let's not break existing scripts.
- From: Peter Cawley <lua@...>
- Date: Thu, 10 Nov 2011 17:20:27 +0000
On Thu, Nov 10, 2011 at 4:10 PM, Stefan Reich
> The nuisance can be removed extremely easily - just keep setfenv.
> (Almost?) full compatibility. No downsides.
Although environments are the biggest change, they are not the only
source of incompatibility:
Any 5.1 script which tries to load bytecode will not be compatible
with 5.2, as the bytecode instructions changed.
Any 5.1 script which uses a local variable called _ENV (unlikely I
admit) will in all likelihood not be compatible with 5.2.
Any 5.1 script which assumes that function closures will always be
distinct will not be compatible with 5.2.
Any 5.1 script which depended on exact wording of error messages will
not be compatible with 5.2.
It is also impossible to write setfenv in 5.2 in such a way as to work
with bytecode chunks whose debug information has been stripped.