[Python-Dev] Policy for making changes to the AST
Guido van Rossum
guido at python.org
Mon Apr 4 22:31:40 CEST 2011
On Mon, Apr 4, 2011 at 12:56 PM, Terry Reedy <tjreedy at udel.edu> wrote:
> Moving optimizations from bytecode (where they
> are demonstrably a bit fragile) to ast manipulations (where we presume they
> will be more robust and can be broader) should be a win in itself
I am still doubtful of that. While in theory it is easier to become
confused about what the bytecode means, in practice the bugs we had
due to bytecode optimization were based on misunderstandings and
unintended consequences that would have caused the *exact* same bug if
the optimization was done at the AST level. (E.g. various
mistreatments of -0, ignoring possible floating point misbehavior for
extreme values or situations.)
--
--Guido van Rossum (python.org/~guido)
More information about the Python-Dev
mailing list