[Python-Dev] Stackless Python
Guido van Rossum
guido at python.org
Tue Jun 1 00:31:41 EDT 2004
> >Anything that can be supported by a pure extension module is fair
> >game IMO. But it was my understanding that Stackless requires
> >changes to the VM.
> I did mean *exposed* as a library module, not implemented as one. I
> am aware of the VM change.
Well, if it's going to be a commonly required feature, it better be
implementable in Jython etc. too.
> > And I definitely don't want people to get into a habit of
> >writing code that relies on deep recursion that is only supported by
> >Stackless, only to find that it doesn't work in Jython etc.
> From the docs of sys.setrecursionlimit():
> """The highest possible limit is platform-dependent. A user may need
> to set the limit higher when she has a program that requires deep
> recursion and a platform that supports a higher limit. This should
> be done with care, because a too-high limit can lead to a crash."""
> Seems to me that the platform-specific nature of this is already
But in practice the current limit is pretty similar across platforms.
If some platforms support virtually infinite and others stick to the
common 1000 or so, that is definitely not sticking to the intent of
the law, even if it is to the letter.
> > > If that gets in, then the other 5% can always sneak in later via
> > > feature creep. ;) Or, more importantly (if I understand correctly),
> > > it could be separately distributed as an add-on for platforms that
> > > can support it.
> >Hey, that's what Stackless already does. Why is that approach
> >suddenly not good enough any more?
> I didn't say that. I was just suggesting that if people had
> specific features of Stackless that they wanted to see in CPython,
> that it would be best for them to write a PEP specifically
> addressing the desired feature(s), rather than asking "why isn't
> CPython stackless?"
I think the bar should be raised pretty high for Stackless, given the
various objections that have been raised against it (x86-only code, no
Jython support, arbitrary exceptions, murky semantics, to name a few).
Together, the answer as to "why" should be pretty clean by now.
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev