Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You could write something like Cassandra or Lucene in Python. Python is a language (much like Java, BTW). You could then run it under Jython or PyPy. The GIL is unique do CPython, AFAIK.


PyPy and Jython lag far behind the current version of Python, which is defined by the implementation of CPython. Also, as I said, I would like to use a combination of Python and C. That's for a reason. The JVM does not have structured value types (structs in C). All structured types in Java have to be referenced, which is the reason why Java software eats so much more memory than software implemented in C, C++, C# or Go. Maybe PyPy can work some day, if they can catch up. That day is definately not today.


PyPy and Jython may lag behind, but that's not a huge problem. I would love to use dict comprehensions and {} sets like I can in CPython 2.7, but I know I can't always deploy against the latest version. And, more than that, I know I can work around those features. The code may look uglier, but it's usually as fast as it would be with the newest features.

And you are right - CPython is the canonical implementation of the language. The fact we can use a reference implementation in production environments is great.

You probably wouldn't be able to write something like Cassandra in Python 2.7 and expect it to run unmodified under Jython or IronPython, but you could write it in Python 2.5 and run it under both 2.7 CPython (with the expected multi-core annoyances) or under current Jython.

And you can't have painless C modules in Java either.


Actually, I believe PyPy has a GIL as well (unless they've removed it recently).


Oops... May have gotten that one wrong, but the point stands. Even if Jython is the only GIL-free implementation of Python, you can run your thread-heavy code on it.

There is no such thing as "You wouldn't be able to do [cool-multi-core-product] in Python because of the GIL"


IronPython is another GIL free Python implementation.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: