2 ms·
The Reason Java Is Still Popular
- ajuc 3y agoI only worked commercially for significant periods of time with Java and C++/js (QML mostly). Compared to Java C++ feels 20 years behind. I would love it if C++ had something like Maven. Instead there's 50 different build systems with their own problems and incompatibilities, and every time I want to add a library to my project I have to deal with all that crap. As for "just make it a class" approach to validation - the problem is that you often want to use 2 libraries together. One library deals with emails, the other library deals with accounts. They use different class hierarchies for Account and Email. Now you have to make wrappers, or do multiple inheritance, or other crazy shit. Instead if the libraries were written in java style, with interfaces and annotations - you can integrate them seamlessly, but what's more - existance of these APIs encourages the whole ecosystem to work around common abstractions. So often you don't even have to do integration - because the abstractions are already shared by different libraries and frameworks. Meanwhile in C++ world you shuffle std::str vs char* vs QString vs OString not to mention separate Account, User, Email etc classes in every library you use.
- ttfkam 3y agoBeen coding in Java since the late 90s. Honestly I have a love-hate relationship with it. On the one hand, it's a known quantity, reliable, and stable. I don't mean this in a negative way. With so much industry churn, Java has done amazingly well. I'm liking the language updates as well, since Oracle took over especially so, which surprised me a lot to be honest. Interfaces like JDBC are really underrated. When using Node or Rust, I can't help but notice how almost every database driver has a separate and incompatible API. I honestly think Java hit the sweet spot with naming conventions. At a glance I can tell when something is a property, a method, a class/interface name, a static member, or a constant. Java also deserves credit for popularizing dynamically-generated documentation in Javadoc. To be honest, I only have a few complaints. It's more than fast enough, but it's still the biggest memory hog by far among the most popular languages. The tendency for Java programmers to rely on inheritance too much irks me. And nulls. Oh, the nulls. I've been finding myself writing Java more like Rust lately where I don't return nulls from methods anymore if I can help it. Optionals or empty collections, but never null. I really wish Java had followed this model from the start, but hindsight is always 20/20.
- pavel_lishin 3y agoFuck, I wish Typescript had checked exceptions.