On 6/4/12 4:26 PM, Michael Foord wrote:


On 4 June 2012 14:33, Armin Rigo <ar...@tunes.org <mailto:ar...@tunes.org>> wrote:

    Hi Martijn, hi Holger,

    On 6/1/12, Martijn Faassen <faas...@startifact.com
    <mailto:faas...@startifact.com>> wrote:
    > Concerning performance overhead of proxies, lifecycle issues
    would be
    > tricky

    If, hypothetically speaking, there is someone interested in writing a
    PyPy solution where both a Python2 and a Python3 interpreter are
    running in the same process, then you gain the advantage of having
    only one GC to run both.  At least it transparently solves the issues
    of lifetime and reference cycles.  (You also have for free only one
    JIT, which can do cross-language optimizations like inlining a Python2
    function into a Python3 context or vice-versa).  I see these two
    points as benefits that you don't have in any multi-process solution.

    It would require some work on the PyPy side, and I'm not aware of
    anybody ready to invest time in that, but it shouldn't be particularly
    hard (once PyPy's Python3 interpreter is ready, and once people agree
    about which API to use to do cross-language calls.)




Having multiple interpreter instances within a single process allows for lots of interesting possibilities. IronPython permits this and it was used by Resolver One - just one of the reasons (along with the GIL) that it would have been much harder to write Resolver One in CPython than in IronPython (although .NET was chosen as a platform before Python was chosen as an implementation language).

Allowing Python 2 and Python 3 to live within the same process would be very interesting.

I too like this idea very much, because _that_ removes the need for a decision which I really can't base upon taste, but module availabilities, PyPy-readiness etc.
Such a bridge would be very cool and quite 'peace-making' if may say so.

When thinking of it, a slightly crazy concern popped up:
I just followed the pyvenv discussions. PEP 405 will not be back-ported
to Python2.7.
If we now have two interpreter versions in one binary, which one of
the Janus-heads will lead decisions like pyvenv startup?

just-semi-seriously ;-) -- chris

--
Christian Tismer             :^)<mailto:tis...@stackless.com>
tismerysoft GmbH             :     Have a break! Take a ride on Python's
Karl-Liebknecht-Str. 121     :    *Starship* http://starship.python.net/
14482 Potsdam                :     PGP key ->  http://pgp.uni-mainz.de
work +49 173 24 18 776  mobile +49 173 24 18 776  fax n.a.
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/

_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
http://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to