6 ms·
We use Java because Python proved to be too slow.
by user5994461 10y ago
We use Java because Python proved to be too slow.
- reitanqild 10y agoAnd because the IDE support (refactoring etc etc), compile time error checking and ease of use more than compensates for Java being a little bit verbose.
- sametmax 10y agoYeah, and they used C because the compilator could optimized stuff the JVM couldn't but now it can. And now Python get type hints so you can have the IDE tools you have with Java like with PyCharm. It's the circle of life.
- user5994461 10y agoNot quite correct about type hint. They are only in python 3. Everyone who adopted python 2 on sizeable codebase is likely stuck there forever, with zero annotations and none of the new tools available, and they'll never be ported back.
- sametmax 10y agoYou can use type hints with Python 2 in the form of special comments (http://mypy.readthedocs.io/en/latest/python2.html#type-checking-python-2-code http://mypy.readthedocs.io/en/latest/python2.html#type-check...). Guido has been working on the type hint project for dropbox specifically to help them to migrate 2.7 code to 3. But let's be fair, type related tooling in Python are not close to the ones you have in Java yet. It's just that eventually, everything comes around. Java got faster. C++ easier. Python ...toolier ? Etc.
- user5994461 10y agoJava got faster and got some functional features. Python broke all retro compatibility and put all existing sizeable software in a miserable deprecated state with the breaking of python 3. I don't recall C++ getting easier. The few tools and IDE still fail at decent refactoring and code completion. The C++11 movement is adding few stuff more or less useful, piling on top of the vast amount of already existing complexity.
- petre 10y agoMost of the C++ annoyances have already been fixed by Dlang, which interfaces very nicely with C/C++ libraries and code.
- Arizhel 10y agoC++11 makes a LOT of things much, much easier. Yes, it does pile on top of existing complexity because they're loathe to eliminate any backwards compatibility, but the nice thing is that you don't have to use older features or methods of doing things. In fact, if you look multiple serious C++ codebases, it'll almost look like they're different languages, as every project basically chooses a subset of C++ they accept. Realtime embedded code doesn't look anything like desktop application code, for instance, but they're both technically C++.
- tigershark 10y agoAnd as far as I remember even google is only supporting python 2. Their python-go transpiler doesn't support python 3 for example (unless something changed in the last months and I missed it)
- petre 10y agoAnd because packaging everything in a jar is easier than pulling 1e3 dependencies for every deployment. Not to mention drpendencies that also require a C/C++ compiler boost or other native libraries.
- sametmax 10y agoYeah and some use C because Java is too slow. The point is, there is nothing new here, the history of computing is repeating itself. It's just now we have better toys, a bigger market and the stakes are higher.
- bluejekyll 10y agoAnd this is the reason that I've become such a huge fan of Rust... back to the metal, high level interface like Java.
- vbezhenar 10y agoRust doesn't bring much in that aspect. You could use C++ for performant high level abstraction for many years before Rust. Rust brings memory safety and that's huge. But it's not anything like Java, it's much harder.
- bluejekyll 10y agoActually, I think it's very similar to Java in terms of what is being offered and at what layer of thought. It does have a steep learning curve, but it's worth it. The number of concurrency bugs alone that I could have avoided if I had been able to use Rust years ago are sad to think about. Java has great concurrency tools, but doesn't do anything to make sure that your not shooting yourself in the foot.
- goatlover 10y agoMmmmm, steak.
- edko 10y agoJava also has JavaFX, which comes with an embedded Webkit browser. I can create my UI with React, or any other HTML/CSS/JS library, and make it interact with code written in Java, Scala, Groovy, Clojure, Kotlin, Ceylon, Frege, etc. very easily. I think this provides all the benefits of Electron, but is even more flexible and powerful.
- sametmax 10y agoYet, this is not as popular as electron. Ask yourself why.
- michaelmrose 10y agoThis is basically a terrible argument in and of itself you would do better to flesh out why yourself instead of expecting everyone to conclude your self evident correctness.
- petre 10y agoToo many JS/web programmers that's why. Plus JS/web programming is way easier and more popular than most of the JVM languages.
- abiox 10y agoi'd guess that there are a variety of things to consider. do you actually have anything to say?
- ake1 10y agoadd nashorn so you have a spare javascript vm just in case...
- vorg 10y ago> code written in Java, Scala, Groovy, Clojure, Kotlin, Ceylon, Frege, etc Your list of 7 JVM languages (both here and in your earlier comment on this submission) seems to be from most widely used to least. Yet in your HN comment from 2 days ago at https://news.ycombinator.com/item?id=14068664 https://news.ycombinator.com/item?id=14068664 you ordered that list differently, i.e. "Java, Scala, Clojure, Groovy, Kotlin, Ceylon, Frege, etc". Have you changed your mind about the relative adoption of Clojure and Apache Groovy in the last two days?