Backwards emulation rather than backwards compatibility?
John Roth
johnroth at ameritech.net
Sun May 26 08:26:16 EDT 2002
"Martin v. Loewis" <martin at v.loewis.de> wrote in message
news:m33cwfr9d1.fsf at mira.informatik.hu-berlin.de...
> "John Roth" <johnroth at ameritech.net> writes:
>
> > > > Could the python interpreter be equipped with a mode that would
> > > > allow it to emulate past interpreters?
>
> > > No, that won't be possible. It is easy enough to install multiple
> > > versions of the interpreter, though.
>
> > Oh, come on now. Anything is possible, the question is whether it is
> > worth doing and (this being a volunteer effort) whether anyone wants
> > to do it.
>
> To fully emulate a past implementation, you'd have to know *all* it's
> features. If you fix a bug, you somehow need to be able to preserve
> the old library behaviour. I see no way to do this, except
> incorporating old copies of the library. Same for the interpreter
> itself, so you would also need to include copies of the old
> interpreter.
Do you really want to preserve incorrect behavior? Code that
depends on bugs is arguably incorrect code.
> Doing so woul mean that the directory structure of the library will
> need to change - such changes are detectable by applications, so full
> backwards compatibility would not achieved.
You'd certainly need something to identify versions. This could be
handled by a compatibility module.
>
> Likewise, the mere introduction of that "mode" would cause that Python
> changes its behaviour, and might cause existing applications to break.
"Might" isn't the same as 'would.'
> So if you want "full emulation", I maintain that this is not possible
> to implement.
>
> If you want "partial emulation" - this feature is available today; new
> versions execute much old code correctly.
However, that's not what the original poster asked for.
John Roth
More information about the Python-list
mailing list