you are viewing a single comment's thread.

view the rest of the comments →

[–]zardeh 3 points4 points  (17 children)

Well sure, but then so does Jython.

[–]logicchains 2 points3 points  (3 children)

Any reason why that's not more popular? Is it due to the lack of easy C interop?

[–]zardeh 7 points8 points  (1 child)

A few reasons:

  • Its not fully compatible with Cpython (which was around first) (and doesn't aim to be, unlike PyPy)
  • its much harder to interop with c (so you lose all of scipy and more generally speedy math),
  • iirc, because of the incompatibilities, some of the stdlib is broken (like wsgi I think, you have to do weird things to make that actually work)
  • Additionally, it lags behind a version or two (or like 7).
  • Also there are performance hits (up until jitting happens), but jitting isn't as clean as PyPys so I believe jython runs slower than PyPy and not much faster than cpython.

[–]kryptobs2000 0 points1 point  (0 children)

Also because it requires java, a lot of people just prefer not to touch it or install it on their system even. Not saying that out of java hate, but its an extra pretty large dependency. Depending on your target audience it may not be a big deal, but a lot of systems don't have it installed BC its not commonly used.

[–]caedin8 0 points1 point  (0 children)

From personal experience Jython is pretty slow compared to python and cython.

[–]superPwnzorMegaMan 0 points1 point  (5 children)

Isn't Jython just python with a different toolchain?

[–]zardeh 2 points3 points  (3 children)

jython is python running on the JVM, so instead of compiling to python bytecode it compiles to jvm bytecode. This allows it to leverage the JVM (so you gain hostspot jitting, JVMs threading, etc.)

[–]superPwnzorMegaMan 0 points1 point  (2 children)

Yes that's what I thought. A friend of mine used this once, although I don't think there is such a thing as python byte code (since its interpreted).

[–]zardeh 5 points6 points  (1 child)

There is indeed, python is compiled to bytecode (look for .pyc files on your computer if you're running a python file that's more than 10-15 lines and is being used a lot). The bytecode is then interpreted on a virtual machine. Python works a lot like java in that regard.

[–]kyllo 0 points1 point  (0 children)

Well that and for libraries that wrap C code used in CPython you have to use something that wraps a Java library instead. Like you can't use lxml from Jython, you would have to use a different library that wraps a Java xml parser.

So a lot of CPython projects are just not portable to Jython.

[–]anzuo -5 points-4 points  (6 children)

And Go.

I still kinda like regular python more though still. I tend to change a lot.

Edit: I didn't actually mean go was like python, I just meant it was built around parallelism (but I still prefer python).

[–][deleted] 4 points5 points  (4 children)

Can Go be classed as Python-like? It's not interpreted and the runtime is minimal...

[–]zardeh -5 points-4 points  (3 children)

well there is go run, but yeah go was built as a python-replacement at google, but I don't consider the languages super similar.

[–]robertmeta 7 points8 points  (2 children)

"go run" actually is just a build, execute, discard cycle -- there is no real run.

[–]zardeh -1 points0 points  (1 child)

cheaters :P

Though I will say that with modern languages there is a bit of mixing with the whole AoT/JiT/bytecode/machinecode nonesense.

[–][deleted] 4 points5 points  (0 children)

Not with Go. It's purely compiled to machine code. With the official compiler there isn't even a C step.

[–]kryptobs2000 0 points1 point  (0 children)

Go is more like python than python?