Python 2.0 and Stackless
Tim Peters
tim_one at email.msn.com
Sat Aug 5 22:51:44 EDT 2000
[Brad Knotwell]
> I don't understand the JPython argument. Per Bothner's Java
> implementation of scheme (Kawa) implements continuations (not
> full continuations at this point;
According to (among many other places)
http://www.gnu.org/software/kawa/internals.html#N2766
Kawa's notion of continuations is extremely limited (basically no stronger
than C's setjmp/longjmp).
> according to Per, the basic design for full call/cc
> support is done and he's begun writing the necessary code).
Reference?
> Is the incompatibility with Java an issue only because there's not
> *currently* a stackless patch for JPython?
The Stackless version of CPython implements continuations in full
generality, but provided you don't call out to non-Python code. If someone
could do the same sticking to the stock JVM, yes, this incompatibility would
go away.
> Similarly, I don't understand the compatibility argument. Further
> along in this thread, a person using stackless python claims to be
> able to use the same CPython modules as everyone else without
> modification.
Well, no existing CPython modules depend on Stackless. As soon as someone
writes a line of code that does depend on Stackless, it can't be run under
any implementation other than Stackless. That's the sense in which it
creates incompatibility: not with old code, but with new code.
> Continuations aside, I'd be happy for now with lexical scoping.
> Is there any chance of this patch (Greg Ewing, right???) being included?
Not now, no. A more general implementation may show up after 2.0. Guido
didn't like the mechanism used by that patch, and a fully general
implementation requires collection of cyclic trash; Python's first stab at
the latter will be shipped in 2.0.
> Personally, some of the debates over SLP, scoping, and GC appear rather
> surreal. To a casual observer, it appears people write code that deal
> with obvious limitations in python and their effort is ignored.
It sure doesn't appear that way to a non-casual observer <0.9 wink>.
> ...
> FWIW, I suppose this would be moot if we had list comprehensions.
They're scheduled for inclusion in 2.0.
> Out of curiousity, have there been PEPs submitted asking for a
> hygienic macro system (ala Dylan or Scheme)?
No PEP, no. It's certainly been brought up many times. In response to "I
want it!" comes the challenge "well, first define it!". I haven't yet seen
a third msg in such a thread <wink>.
peps-take-more-work-than-vague-wishes-ly y'rs - tim
More information about the Python-list
mailing list