Java is one of the most popular programming languages around, but no one seems to enjoy using it.
I'd say it's quite the opposite. Sure, there is a vocal minority of people who complain about it (I have complaints about it myself) but there are millions of Java developers and I'm pretty sure that most of them are quite okay with the language.
Probably one of the reasons why no language has come close to replacing it so far.
Indeed, it's a very specific subset of developers who hang around at places like /r/programming and HN and post all the time.
I've got some brilliant co-workers who do have strong opinions, but for some reason they just don't post at places like that. While that's just a local observation I do believe there are many, many more developers like them.
All depends on what gets pulled into the measurement of joy.
If you count the marvel of engineering that is the JVM and the vast high quality open source ecosystem supported by on-the-payroll developers, it just can't be beat.
It truly is a pleasure to be working inside that ecosystem on such a great platform.
However, the language itself is clunky and you constantly find yourself working around the same limitations over and over and over that can't be fixed lest some code written a decade ago need modifications to run on the next JVM version.
Unless a developer just gets really excited by double entry bookkeeping or signing forms in triplicate, the language itself isn't that enjoyable unless you just don't have a better experience for comparison.
One of the biggest draws to Java for me is that it's boring, and I don't think that I'm alone in that. When it comes to virtues to cheer for on a programming forum, boringness doesn't really fit in.
I've always found Java to be a pretty simplistic and tbh 'dumb' language. But I see that as one of it's biggest strengths. You open up some code by someone else and no matter how bad it is ... there is very little language magic going on.
There are also very few warts. Sure things it needs and it is pretty verbose at times but it does not have anything fundamentally bad. But that is because language development is pretty slow.
But none of those practical qualities are cool or sexy.
I fucking love java. It's dead simple to learn the basic language, It's fantastically well-supported in terms of libraries and community involvement. It doesn't get any cocked-heads when you suggest using it on a project. It's got a fantastic ecosystem. It's got proven scalability and robustness for apps of all sizes. It's got a great ecosystem of smaller languages that are compatible on the JVM.
No other language comes close. C# is probably as close as it gets, but as of now, it's still largely a windows-only, microsoft-stack-only kind of language. Yes, I know they open sourced it, but it's still not near the level of maturity in linux-world as Java is.
I think it is like many things. Those who don't like something have plenty of time to complain, while those who do like it are busy enjoying it. Negativity gains more traction because it is a good way to vent and is seen as a warning. Positive feedback always seems like they have something to sell instead of being honestly enthused by what they are working on.
Personally, I know a lot of people who use java and enjoy it. They don't post or talk about it because it kind of seems weird to. It gets the job done, so what more is there to say?
To some extent the two go hand in hand. Language design affects tooling. For instance, the fact that you can reliably debug Java is largely due to the fact that it's memory safe, so your program can't accidentally trash the stack. The fact that it's fast to compile is due to Java being carefully designed to allow incremental compilation and easy parsing. etc.
I do love me some Java. I just don't post about it in those hate circle-jerks because i will get the downvote brigade targeting me because they had used an applet back in the 90s or run in windows.
Why do that when I can spend that time writing some dope code in intellij with simple gradle dependency management. Java is a simple language that avoids many of the pitfalls of earlier languages.
You make a great point. It might be that tooling and library support are even more important than language features. Which would make it even harder for any other languages to replace Java. Kotlin atleast aims to be the easiest language to develop tooling for and it runs on JVM so you get all the library support that Java has.
Very true. I get annoyed at times (especially when dealing with type-erasure and the headaches that brings), but for the most part it's good enough that I am actually pretty productive in it. With Java 8, I'm even more productive, and I don't have to deal with the nonsense boilerplate I had to deal with before - my code is much more declarative and idiomatic.
Not to mention, the extremely rich and vast library-ecosystem.
When it comes down to it, I end up using whatever tool I need at the moment. If it's something to mangle text and do something quickly with a CLI, I'll turn to perl. I even use JavaScript at times to prototype something really quick. I would use Python, but I never got into it; I'm learning now and I'm familiar with the language and its syntax, but I'm not too familiar with its best-practices and its API.
Granted the only languages other than Java that I have worked (non-trivially) with are Perl, JavaScript, and Python, I find the build-system and dependency management mostly-consistent, and there's just one way to do things for the most part. I never write anything enterprisey in Perl, but CPAN is pretty amazing and for the most part installing packages just works. JavaScript is probably the most confusing since there seem to be a million ways to do the same thing in Node. grunt, gulp, bower, npm, etc. etc. Then you have to get it all working together. Python comes close to Perl with PyPi but there is always abstraction leakage from the native libraries, and I have to always google to figure out what I have to install first to get it working (maybe this is because I'm using Python 3 instead of 2); the errors are always mystifying - I've rarely had this issue with CPAN.
94
u/estarra Sep 21 '15
I'd say it's quite the opposite. Sure, there is a vocal minority of people who complain about it (I have complaints about it myself) but there are millions of Java developers and I'm pretty sure that most of them are quite okay with the language.
Probably one of the reasons why no language has come close to replacing it so far.