As a TypeScript lover here are the things I dislike about Java:
* Comparably slow startup. It seems to take so much long to compile the code and startup the JVM for a large application compared to a similar JavaScript/TypeScript application.
* Yes, Java is verbose and that can be annoying but this super low on my list. I can work with this.
* Java forces OOP on you. The original benefit of OOP is efficient memory conservation, but these benefits are lost on garbage collected languages. The primary reason OOP continues to exist is stylistic preference and it’s a preference I don’t like.
* Error states and stack traces feel like a drunk person throwing up. They are all over the place, far too large, and feel like they blame the user for even daring to execute the code.
It’s not all bad. People who write Java seem like they know what they are doing, and I am fully aware this me being naive. Most corporate JavaScript people absolutely have no idea what they are doing. The difference in insecurity and output is strikingly visible from a distance.
I program primarily in Typescript and Golang these days.
And yes, most corporate js people tend to not know much about things like dependency injection until they end up with the kind of problems that led to dependency injection in the first place. But Javascript/Typescript caters to everyone's taste and level. If you want to do enterprisy stuff and write properly constrained software - you get to do it.
Working in a language that tries to enforce "type" discipline and certain conventions really gets you down to solving problems the right way - instead of just hacking together a workaround. So most of the time, people who write Java tend to be more thoughtful about their approach to various things in a way that the typical Javascript developer probably isnt.
Generally though Java error messages make more sense. I have been experiencing extreme pain picking through 200 lines of Typescript error output for what amounts to 4 instances of a type without a required property in the codebase.
* Comparably slow startup. It seems to take so much long to compile the code and startup the JVM for a large application compared to a similar JavaScript/TypeScript application.
* Yes, Java is verbose and that can be annoying but this super low on my list. I can work with this.
* Java forces OOP on you. The original benefit of OOP is efficient memory conservation, but these benefits are lost on garbage collected languages. The primary reason OOP continues to exist is stylistic preference and it’s a preference I don’t like.
* Error states and stack traces feel like a drunk person throwing up. They are all over the place, far too large, and feel like they blame the user for even daring to execute the code.
It’s not all bad. People who write Java seem like they know what they are doing, and I am fully aware this me being naive. Most corporate JavaScript people absolutely have no idea what they are doing. The difference in insecurity and output is strikingly visible from a distance.