3 ms·
There are huge differences between JVM and cpython. First of all - Python isn't trying to be an isolated VM with its own, hardware-independ type system, complic
by schiptsov 15y ago
There are huge differences between JVM and cpython. First of all - Python isn't trying to be an isolated VM with its own, hardware-independ type system, complicated FFI which involves lots conversions, memory copying and reallocations and other crap called Native Interface. You need no servlets, containers and other useless abstractions. You're just loading a module (linked with a shared library) and calling necessary functions.
Of course, if you are getting paid (very well) just for lines of Java code (because technically incompetent investor believes in all that hype about Java and JVM) it makes a lot of sense, but don't even try to say that utilizing useless abstractions and thousands of lines of code to do primitive tasks is 'the right way' or even a competent one.
- daeken 15y agoI'm a long-time Pythonista and there isn't enough money in the world to get me to write Java, but you're completely full of it. Python is an isolated VM with its own hardware-independent type system, complicated and expensive FFI, etc. Ctypes has a beautifully clean interface, but it's certainly not cheap, and the JVM will crush Python in terms of performance in the vast majority of cases. Servlets? Containers? Why would you need these in this context -- you seem to be throwing out Java buzzwords to see what sticks. Simply put, there's absolutely no reason why Java couldn't be a good choice here; that doesn't mean that it is implemented well in this case, but there's no reason why it couldn't be. Python, from an architectural standpoint, is by no means better suited than the JVM for this, even if the language and libraries are subjectively much, much nicer.
- schiptsov 15y agoServlets and containers are here because I saw them in the sources on github. ^_^ if the language and libraries are subjectively much, much nicer. - that is a huge mean - choosing appropriate tools for some particular task. ^_^