Java Instead of Python

August 10, 2017

Quantum Financier asked a question about thoughts on Java vs Python in RE: to the previous note. I thought it might be useful out of the comments-

Why I’m using Java
Java is strongly typed which means it won’t let you make obvious errors. Especially helpful when you want to write things without running it and you don’t want a huge debugging job when you finally do run things (for example when you write code on the weekend and can’t run it till Monday, or when you don’t have internet). Also very helpful for refactoring.
Most APIs are native Java so you can save some work there.
The Netbeans Java IDE is a lot better than any Python development tool I’ve found, and also the code completion feature along with JavaDoc comments makes it so you never have to look things up. Python’s command line is nice but beaten by the above. Also, most of the verbosity people complain about with Java is handled really smoothly by Netbeans autocompletion so you almost never have to type in all the brackets, overridden interface methods, etc.
Java is easier to set up because it’s already on pretty much every computer. Whereas for Python you have to maintain your own distribution of libraries which makes ramping up another development computer a really long process and sometimes a pain. Annoying because I usually wait to go through the pain of installing things when I’m motivated to work on strategies, but installation usually burns me out for a session.
What I’ve missed about Python
Python is more flexible which might let you use more intuitive designs, like having callbacks with first-order functions (which Java doesn’t have).
There’s very little difference between what you can and can’t do or even how programs end up looking. I wouldn’t say one is clearly better, most of the differences are semantic/subjective. They’re both well-developed advanced languages with good communities. I’m continuing with Java for some current projects though (glancing at Scala every now and then too).