On Fri, Feb 28, 2014 at 8:16 PM, M.-A. Lemburg email@example.com wrote:
I'm been thinking of doing something like this but the other way around - embed Python2 in Python3. When starting to brainstorm that idea, I quickly ended up postponing the idea again due to problems with C extension linking, dual interpreter environments, object interfacing between the two worlds, having two separate exception class trees, two sets of basic types/classes, two GILs, etc.
The another common solution is to make the two halves completely language-independent. Separate two processes with a pipe, socket, etc, and communicate with streams of bytes moving back and forth. I'd consider that to be the zero-mark for any blending solution: it's simple, it's straight-forward, it's guaranteed to work, so you have to make something that's better than that - faster, easier to use, cleaner, whatever. That's the mark to beat.