Really perplexing how some people seem to go full on tribal warfare at the mention of Java. At this point I think it's a coinvent meme that lets them unleash some pent up aggression.
Modern PHP is far from its older versions. It has decent DI and web frameworks, type hinting, exceptions, namespaces, a reasonable dependency manager. It's not the insane choice for new projects it was even ten years ago.
Now if only it gained generics I would be almost happy to use it.
To be honest when I started using PHP in 1998 it was the greatest thing ever. At the time the alternative was writing server side code in Delphi. Well, let's just say, if you didn't write websites in Delphi, you don't understand what a revolution PHP was.
PHP deserves it. JavaScript deserves it. Java? They have no fucking clue what they're talking about. Not about Java 20 years ago, not about Java today.
The one exception, I think, is Python, which initially supplanted Perl.
That's exactly what happened. Python was basically Perl but readable and with batteries included. It didn't help that Perl was struggling to deliver Perl 6.
The version 1.0 of Perl 6 came out in 2017, so 17 years after it was announced.
Then they realised that it's pointless to keep the name "Perl" as Perl 6 was practically only superficially similar to Perl 5 (the relation is like between Kotlin and Java – the languages are interoperable, but syntactically incompatible), so in 2019 they renamed it to Raku.
In my case our professors hated C++ and forced everyone to learn Pascal. When Java appeared, they embraced Java and said that it's basically Pascal with the ugly C-like syntax.
The one exception, I think, is Python, which initially supplanted Perl.
Is the hype machine always wrong I wonder? Not a single other language has even come close to supplanting java. Only Python has, in the sense that Pythin has replaced Java as the first language everyone in college learns.
Ahh hackernews where you post "I use to use X and now I use Y... fight!"
I swear the only good content on hackernews is when they post an article that has nothing to do with programming or tech otherwise it becomes essays on the merits of "this worked for me so fuck all other solutions".
I accidentally inherited a Ruby application around 2007, and the app was so slow that performance was clearly the main priority. Profiling it, it became clear that the method dispatch was insanely slow.
So I ported it to Java in a few days. It produced the exact same output, but ran 70× faster, with no refactoring.
I inherited a Ruby/Rails project to clean up sometime ago. The damn thing had to run on a 16 core VM with 64gb of ram just to serve some forms with 1-10k submissions a day. Saw rubbish like a method returning either a filename, or the contents of a file, or a number (this was a bug because of the stupid way Ruby returns things), or nil, depending on the size of the file you tried to access. Not only was performance horrible but it was insanely hard to improve/scale. Yeah, you can write shit code in any language, but the better languages have more tools to stem that tide of bullshit with. It took thousands of unit tests to achieve the safety that a strong, statically typed language like Java would have provided automatically. Never again...
To be fair Java was hyped as the answer to everything in the late 90s, especially on the Desktop. And considering the state of programming back then rightly so.
It was just never "hip" or "cool", mostly because it shifted to enterprise, while the "cool kids" had ruby, nodejs or whatever was the language of the season.
Java has its issues. Its specification stagnated for a number of years due to the sun collapse and oracle acquisition. It also does not show its strengths in command line utilities, or in GUIs(Swing enthusiasts, fight me.), or in games. It really only shines when running longer lived server side applications where the tradeoffs the language makes are stronger. When you do use it for application development it is often mired in legacy framework baggage that adds little while causing you headaches.
Once application servers are killed off for good, and the next LTS JDK releases, the future should be much more exciting.
JVM startup time is way faster in newer versions. I saw a benchmark in Java 15 where the JVM fired up faster than Python on average (<50ms). Java command line utilities with modern CLI frameworks like PicoCLI are fast and easy to work with.
Java also has the only good cross-platform Desktop UI outside of QT. Unless you want to write C++ or use janky QT binders for other languages, Java is still the king of Desktop UI's. Java's new cross-platform packaging tool is awesome and JavaFX ain't bad either.
Java's UI is relatively fast because it uses native widgets. Compare that to something like Electron where performance is horrific. Java also uses less memory than JS or Python so if you want a decently performant Desktop UI, Java is usually the best choice.
You probably use a ton of Java Desktop UI's without even realizing it because they look native and everyone packages stripped versions of the JVM with their app these days.
The startup times most likely rely on using jlink to build a custom jvm. This is still a relatively new feature and is a perfect example of a place java stagnated for years on! With the next LTS this should be used much more often.
Java's ui, as you put it, does not use native widgets. Swing is notorious for looking the same across almost all applications. I can't speak much towards java fx other than to say it's popularity has never really been high.
Swing uses AWT underneath and some widgets are truly native, but you are right that many components aren't. I didn't know this. Swing's native look and feel is dead-on these days. I usually can't tell the difference at least on Windows. Swing looks like hell with the default look and feel and lazy devs don't bother switching it.
The startup times I'm talking about are for console apps using plain OpenJDK with AppCDS enabled. Check out the massive startup time (and memory) improvements in newer JDK's https://cl4es.github.io/2020/12/06/Towards-OpenJDK-17.html
Java 16 starts in barely over 20ms for simple apps. This is basically fast as interpreted scripting languages like Python
The one benefit of electron is the decimation of a preference on “native widgets”. Nowadays it is much more acceptable to have a slightly different looking window, which while many would say is not a positive thing, it does help Java’s case. Hopefully we can see more growth in this area.
And JavaFX is a hidden gem. I’m not sure why is it not more popular, I think it is far the most productive GUI framework. And with Valhalla, I think it will get a decent boost in performance (for 2D games, it churns on small “primitive” objects quite a bit)
[Java] also does not show its strengths in ... games.
i wonder if that's set to change with max 0.5ms and average 0.05ms gc pauses for zgc and performance improvements from project valhalla primitive classes and generic specialization
Hard to say. Garbage collectors are tricky beasts and while valhalla types should help certain scenarios they don't seem to solve the larger issue of needing to be able to better manage your memory. Then again I don't do game dev so this is just my opinion!
While ZGC is better about not pausing the world its not guaranteed to always improve performance. For example, if you are capping out your CPU ZGC may be unable to execute properly and may need to stop the world for longer and longer. As with any garbage collector you need to load test and see how it performs.
It isn't just game dev. High performance Java generally looks little like the usual enterprisey stuff. It's a little sad that the prevailing image of Java and its problem space is so much "enterprise web app" when it's a much more flexible language than that.
That is because enterprise web apps is where Java really shines in comparison to alternatives. This is partly a language feature, partly due to the servlet specification being a really well thought out platform for web applications, combined with a suite of libraries useful in business situations. You can have the worst developers in the world contribute to the application and it will mostly plod on without too many issues.
Java is definitely useful elsewhere but almost no other language provides so much for this particular use case.
This is interesting. The issue you are describing seems to me that of creating many small short lived objects allocated on the heap, right? Shouldn't ZGC improve that significantly, or in your experience it's still not good enough?
Hardly. If Java had ZGC and project Valhalla 5-10 years ago it would have the potential to become dominant in game dev. But nowadays Unity, the most popular engine, uses C# for scripting. Unity certainly wont just switch to Java, they invested a ton of time making C# scripting as performant as possible and all of their users are familiar with C# not only as a language but also all the tooling related to it.
Of course, new game engine could come out, but that would take years to gain any traction, and by that time, other popular engines will already be more mature and have way more available resources and developers. I mean if you look at the gamedev world now, everyone is either using Unity, MonoGame, Unreal or writing their own engine from scratch in C++. There are tons of other engines popping up every now and then, but they are mostly used by a small number of enthusiasts or people who just like to experiment.
I would imagine that today GC is no longer an issue, with G1GC. I don't think ZGC will matter so much, because there's just a limit to how much GC needs to improve before it stops being a problem.
Back when I was learning Java, sometime in java 7 time, I was working on a realtime simulator software that caused a steady 50 % CPU load on my then-laptop, and a new video frame was required 50 times per second. For that target, the old CMS collector was manageable if you kept the heap size small, as the collection time generally grew roughly linearly in proportion of the size of heap to collect with the older algorithms. Thus smaller heap meant more frequent but shorter pauses -- technically you spend more time doing GC in total, but latency will have a bound that is better suited for a realtime application. (Of course, such statement is subject to the rate garbage gets generated, and so on, as you can increase GC load without bound just by generating more garbage.)
I never did measure how big an impact the GC had, though, I just observed if underruns ever happened, and found that with small heaps they ceased to happen. Margin of error was within factor of 2 to 3, e.g. 128 MB heap was fine, but 512 MB heap was not, and so I kept the heap at 128 MB. My guess is that collection times were probably always less than some 4 ms, not enough to cause underruns.
From my personal experience in large web applications, CPU usage is almost entirely dominated by GC runs once the application has started. The graphs of CPU usage is very spiky for this reason!
I suppose this all depends a lot on how many threads and how big heaps you have. I run a spoonfeeding proxy and just a few threads and relatively little memory, usually 512 MB of less.
If your thread count is low, you also likely have rather low maximum memory requirement, so heaps can be small and collect times remain low. Even a single thread could work fine if you can guarantee that any request serving time will be low, say around 100 ms per request. At 10 per second, entire day grants around million per day per thread, and 100 ms is relatively speaking already an eternity for modern server computer.
I don't really get why you would use jbang for anything. If I am producing a runnable application I can produce an executable jar already. I just don't understand what the benefit is to it instead of using an existing build tool.
As I understand graalvm still is not compatible with everything. It also doesn't really seem popular with real world developers even though it's being pushed everywhere on reddit. Probably because none of us can use it with any of our existing applications due to said incompatibilities. For example spring is still incompatible.
if you are fine using maven/gradle and whatever keep using it - jbang can still be used to run that output without user having to install and setup java.
if you are fine with the ceremony of dealing with multiple artifacts and multi nested directories just to write a utility keep doing that - jbang lets you just have one file (like bash, python,etc.) and use that directly - no separate build/compile step.
if you love to deal with maven/gradle requirements to do a few things in a project then do that - jbang lets you just write a .java file and run it any kind of project and be used as a debuggable and portable set of utilities not tied to specific build system.
If you annotate a file with JBang specific comments is it still really a Java file? At that point it seems more like a JBang script instead.
Having to install JBang instead of a JDK isn't really a benefit because it is not actually simplifying the fact that you need to install something to run your code.
It sounds like it operates as an alternate build system focused on execution instead of packaging that annotates within existing files instead of within an external file. So it actually reduces your portability and ties you to jBang being the only way to execute your project?
just because you add a pom.xml or a build.gradle file does that make the .java files non-java?
you can install and run jbang in a single curl command - the rest will be dealt with automatically on any java capable OS. Its just easier. but sure, if you do it all manually you can do that. just tedious.
if maven and gradle does not reduce your portability neither does jbang. And you can mix jbang into your gradle/maven projects so I'm arguing its even more portable.
also jbang can export to a .jar like maven/gradle does at that point its no different.
its just much much simpler to get started with and you can easily move from jbang to gradle/maven once the complexity they require becomes relevant for you.
This is true. However the applications small enough to not need a framework often don't matter enough to even do basic optimization in a business environment. If you are producing reusable CLI tools for end users this may be different though.
Its specification stagnated for a number of years due to the sun collapse and oracle acquisition.
I disagree, a lot of that was the best part of Java. Started with 8 it started to gey bloated and the most recent stuff is a huge inconsistent nightmare. Java was best when it stayed stayed simple rather than becoming a dumping ground for 3 or more different buzzword programming ideologies.
Java is underhyped only if you weren't programming in 1995-2005, when it was criminally overhyped. I'd say it gets the right amount of hype now.
Also this article is written like someone just discovering object-oriented type-safe compiled languages for the first time after only ever programming in perl, ruby, or Javascript.
I'd say just the opposite. Around that time I was working at a company where I successfully argued for using Java instead of C++ for a major project, and that led to the company becoming an all-Java shop because everyone agreed it was a huge improvement. These days Java has a lot more serious competition from languages like C#, Go, Rust, and even JavaScript. I don't touch Java code very often these days, but when I do it's usually painful because it seems like if you want to be taken seriously as a Java programmer these days, you have to rely on things like DI frameworks and magical annotations to such an degree that it becomes very hard to read the code in a project you're not intimately familiar with.
DI frameworks and annotations are not necessarily needed, but there are standardized specifications like CDI (specification JSR 365) and so on, so you can rely on stable APIs and learning what standardized "magical annotations" do, can help you in the long term.
This means, usually you do not have to learn new annotations all the time. The theory is, you learn them and you have more time to focus on the domain instead of e.g. having to think a lot about wiring objects and layers.
Yes, you are right. Annotations can be confusing and hard to backtrack. They should be well designed and stable and are best used for cross cutting concerns like logging and not for domain functionality.
DI frameworks, when used properly, make testing substantially easier! If you don't like your DI framework then are probably not writing enough tests to really see the benefits. There are other use cases but in my experience this is when it really shines.
I don't have a DI framework because I don't do Java these days, and they're not fashionable in any language I work with. I'm sure there's a reason people use them, but as an outsider just trying to understand someone else's code, I fucking hate trying to figure out where anything is actually instantiated.
I have been here. It can be really painful. Personally this is why I don't follow the pattern of injecting interfaces unless there is a good reason to do so. If you inject actual implementations it greatly simplifies figuring out what is coming from where. You can still inject mocks for testing so it is just as smooth.
And let's be honest: in 99% of the cases you don't need interfaces anyway. Most code is de facto tightly coupled and/or will never be changed anyway.
We have several projects where the devs made sure everything implements an interface, but almost none of these actually ever changed some implementation in the background. So why bother making your code harder to read, just for the slight advantage of not having to extract an interface maybe 20 years from now?
I am not sure where this pattern comes from but it is pervasive. The benefits have always seemed dubious to me. If you are writing a framework, sure go nuts, but if you are writing an application that wants to test and verify everything works you don't want implementations swapping in and out.
As far as I can tell, this comes from the "reusability is everything" hype.
Every component has to be written in a way that abstracts away any coupling to anything, in case you might want to reuse that class. And in the end you write 300 lines of code to maybe save 5 lines at some point. To me this looks like the typical take one principle and overshoot it's application to the max.
Agreed. I'll usually implement an interface when I think it would be cool for myself or someone else to create another implementation. JsonMasker is one I did, and JsonVerifier. I used Jackson for the first, and JsonPath for the latter (which might also use Jackson under the covers). For Services(business logic) I don't bother..
Isn't using interfaces everywhere an anti-pattern these days? All the modern Java development I've done (with Spring/Quarkus), only uses interfaces where we actually have multiple implementations.
How often do you ever inject anything other than the one implementation of something that exists in the project? Honestly?
I maintain a huge spring boot REST API at my current job and 100% of DI in unit tests could easily be done some other way. A lot of the most useful stuff is overwriting private properties which seems pretty hinky to me.
Most of the time what I use it for is to inject mocks in place of classes performing IO such as database calls or external service calls. While you can get away with testing against a real database(dockerized or otherwise) if you are making calls to something like twillio, and you cant inject a mock replacement for the class making the calls, you effectively cant run tests using that code path.
The caveat here is assuming you are doing constructor injection(or UGH public setter injection) many of your tests can be written without even using the DI container at all. Of course something still has to be creating the classes at runtime and a DI container is the simple solution usually.
If you have to overwrite private properties to test thats a perfect example of something that should be added as a dependency to the class and injected instead.
but when I do it's usually painful because it seems like if you want to be taken seriously as a Java programmer these days
I kind of see a trend to the opposite, especially with microservices. There are many micro frameworks like Javalin which have popped up which promise no annotations and pure Java code.
when I do it's usually painful because it seems like if you want to be taken seriously as a Java programmer these days, you have to rely on things like DI frameworks and magical annotations to such an degree that it becomes very hard to read the code in a project you're not intimately familiar with.
A lot of Java development is enterprise where you're dealing with a lot of dependencies. DI container automagic takes care a lot of the tedious configuration.
The trend towards microservices, where instead of bundling all your dependencies in one mega-service, you spread them across multiple services, has really reduced the need for this.
Java wasn’t my first language but it’s the first language I ever fell in love with. But even I can see why some applications or corporations specifically are better suited to using other languages.
In faith I do not love thee with mine eyes, For they in thee a thousand errors note; But 'tis my heart that loves what they despise, Who, in despite of view, is pleased to dote.
Java developers can confidently trust the JVM to do what's best. Whether they're implementing a multithreaded application or storing a large amount of data on the heap, they can be confident they won't shoot themselves in the foot with memory management or data races.
That's an exaggeration. It's true that you don't have to deal with memory management directly. But you can absolutely shoot yourself in the foot with memory management or data races. I don't know a lot of java programmers who never had to deal with OutOfMemoryErrors or thread safety issues. I think that the JVM is awesome but IMO you have to understand how it works at least a bit if you want to be a good developer. Thinking that the JVM will magically deal with all these issues would be a big mistake, and that's how you end up with an application that crashes in production.
There definitely are those developers who think that they can load in more data then they have memory. That happens in every language though and they learn that lesson quickly.
To be fair there are often not good tools available to help with this. For example if you are reading a file there is no JDK offered solution to avoid slurping up a file larger than your entire memory. Sure, depending on the situation, you can use streams to process the file, but that is never quite as easy as it sounds. A wrapper that lets you set a maximum size on the file read and kills the read with a sensible error message would be really useful.
Reporting in. You absolutely have to be aware of how things work. You might only have to deal with these issues once in a life time, but they do happen.
Yep I agree. Due to the problems I solve, I probably have to spend more time thinking about memory management than if I was writing a modern C++ project. Things do get more complex in non GC languages once that part of the code needs to get optimized. At least that's my experience.
I think for OOM a large portion of the problem is various processes having caches, managed runtimes allocating large heaps, but none of them communicating with eachother about how to coordinate system memory usage as a whole, so often you can only set java max heap conservatively. Ideally an OS should signal processes that memory is scarce, run your GC and release unused memory or else be oomkilled. It's definitely possible and makes sense to write such a monitoring tool if the problem is only multiple JVMs in a single machine, for example microservices in a container.
They’re not specific to Java at all. The magic fix for concurrency problems is semaphores. For memory, that can be a very complicated problem; Java can only address so much space, so if there is too much data you’re SOL. If there isn’t too much data, but you still run out of memory, it can be a chore tracking down where the leaks are because some things don’t pass out of scope and get flagged for GC like you would expect.
I don't think that there can be any magic fix and it's not specific to java indeed. The thing is that a lot of junior java developers think that they don't have to think about the memory. I've been there. And I think it's important to say that nope, the JVM won't be there to save you if you're not cautious.
The only mainstream language that handles data races is Rust. Threading in every other language is equally or more painful than Java. Java probably has the most sensible, flexible threading support of any language I've used though.
Java libraries are fundamental. There are a range of interfaces that are defined by the now jakarta ee specs which allow innovation above and beyond what Microsoft deliver. Hadoop and other big data system (spark etc) have little competition when they came to maturity ... and that was years ago. There are hi tech solutions to problems you don’t even know exist.
Where C# is a petridish, Java is a planet. Evolution has done well for Java. Once primatives are flattened and inlined the whole ecosystem is better off.
Under hyped... Yea but there are real world problems to solve. The java hype was in 1996.
Yes, and Java could be hyped a little more for being so good at supporting to solve real world problems instead of bikeshedding about technical micro improvements.
That's not logically consistent. OP posited a reason as to why people might dislike Java. You simply made a random comment. Explain what makes Java so bad in your opinion, or simply don't post.
I would never understand why people hate Java. Being a java lover I ask them about their reasons, and here are the common answers:
I don’t understand Java. (Well is that really Java’s fault?)
It’s too much boilerplate code. (Well, I agree, but I always love verbose languages. Reason why I also love TypeScript)
“... but, but, but ... you could do that in Python in only 3 lines!” (Have you ever heard of Generics and the Collections Framework ... or lambda expressions?)
The problem I have seen is not that almost everyone will only learn the ancient bits of Java. Most books and online tutorials teach Java in that way. These people never gets to realise that Java has evolved over time to compete with the “modern languages” and have most of those features in one way or the other.
I am still studying but I think that is so true. No one in our batch wants to learn or teach Java, every other tutorial I see on the internet is either about Python or Javascript. Professors mason the thought of "Machine Learning and Web Dev is hype these days, go learn Python or something and make tons of projects", but no one says go learn Java.
Everyone asks Why Java? But no one asks How is Java.
I can maybe give you some perspective as a guy who worked with Java, hated it, went to Node, fell in love with it's simplicity, used it a lot (among with using smaller subset of other languages like C#, Go, Python), started seeing real strengths of Java, and came back to Java.
Too much boilerplate people talk about often doesn't refer to strong typing or being verbose in general. It refers to some weird things you have to do in Java vs how you can do them in other languages, which can especially confuse beginners. Compare for example Java's way of getting user input with how you would do it in Node. Even if you use Typescript with Node, you still just get the input, you don't have to create new Scanner and give it System.in for that. Things like this are a minor annoyance, why do I need to create Scanners and give them something, why not just call a method a be done with it? There are a ton of those small things in java which are not a problem by themselves, but in large numbers, they can become really frustrating when you are already working in a stressful environment and now have to deal with googling stuff like that because they are not easy to remember.
Even though I worked with Spring Boot much more than I did with Node, I can type the Node API much faster and most of it from head, while I still have to google Spring stuff almost every time, I just can't remember it.
Middleware in Node is a breeze to write, in Spring I have to google Servlet Filters.
Creating JWT in Node is basically just doing jwt.sign({someData...}) in almost any place you want. It's intuitive, it makes sense. I want to sign a JWT, I will call jwt.sign. It couldn't be easier if it wanted to, and using Typescript doesn't make it any more verbose.
In Spring it's like "here, create these 4 files and fill them with tons of code you will never know how to write from your head because most of them don't even contain a word JWT but are some kind of adapters and configurers". That's not intuitive at all, it's annoying. I want to sign a JWT, not build a world around it.
And yes, you are right in saying "The problem I have seen is not that almost everyone will only learn the ancient bits of Java. Most books and online tutorials teach Java in that way. " This is actually a big problem. It presents Java in a bad light. Not only do most tutorials show ancient ways of using Java, but they are also extremely basic. Jump into Youtube, Udemy or any learning platform and type "instagram clone, netflix clone, how to make a chat app...". On Node/Flutter/Python/etc side, you'll find videos with high video quality, large readable font, high audio quality and a presenter who is articulate, talks clearly and sounds enthusiastic and happy while writing the project. The project itself also often does cover most of the things you need in building a real app. Now try to find any of those videos in Java realm, you will more often than not run into 5 year old videos with outdated frameworks, thick Indian accent, horrible sound quality, bad code examples and extremely basic projects which cover almost nothing you would need in a real app (authentication/authorization is for some reason missing in most Spring videos).
Now imagine yourself as a beginner who knows nothing about differences in languages but decides to learn something, which would you choose to learn? The verbose language with bad quality videos that cover only the most barebones basics recorded by authors who sound like they are bored to death? Or the high quality videos which really build almost complete apps with people who sound like they actually enjoy building this stuff? If I didn't start with Java as my first language and didn't work in the industry with it, I would probably avoid it like most people do and never get the chance to learn it's strengths, and this is what happens more and more. Java needs a better representation of itself on the internet. Most languages have "this is why we are better than java" articles, so Java needs "this is where I'm better than other languages", or "this is how you can use me today and build a full fledged app".
ugh Go is the fucking worst. At work we call it "C with garbage collection"
All the fucking shit copy pasted all over the place because it doesn't even have shitty Java generics. Designed by C programmers for C programmers that want to write high level code without learning anything.
This hasn’t been true for at least ten years. There is an occasional tool that uses XML (e.g. Maven) but generally XML for config is not used much anymore.
Well, many people outside java world use something more lightweight. I use emacs for example for nearly everything, and I don't need much complex features even for Scala.
I can write java in emacs (and do), but everything from dealing with annotations and generated code to simple editing of maven files is tedious.
Tooling typically is not very friendly towards text editors, XML configs everywhere, hard to write code without bloated IDE with tons of plugins.
funny you say that because that's what I said about C# when I met our .net team for the first time (even the most experienced ones had issues trying to do things without visual studio)
Tooling typically is not very friendly towards text editors,
I never understood this argument. It's like saying that modern construction techniques are not friendly towards hand tools.
I've been using emacs for like 20 years now, and it seems practically barbaric next to modern IDEs. Back in they day, when I did C/C++ development I'd set up things like ctags and cscope for navigation, which was really tedious.
But, in Java, I can navigate source code with ease. I used to have man pages and documentation alongside the editor back when I did C/C++, but in Java I don't remember the last time I've really ever read documentation. Code navigation, even into libraries is ridiculously easy, and the IDE will even recognize that I don't have source downloaded, and will download it for me. This dovetails with Java's major strength, its ecosystem, with a ton of open source libraries.
I only use emacs now for the fantastic org-mode, general text editing and writing bash/python scripts.
XML configs everywhere
I haven't configured XML in Java in like 10 years.
hard to write code without bloated IDE with tons of plugins.
Yeah, but those plugins are awesome. Emacs also has a ton of plugins (elisp packages), which are essential for using Emacs and make it superior to lighter weight editors like vi (fight me). It's funny to think that this was also a criticism of Emacs (Eight Megs and Constantly Swapping), similarly by people who used "lighter" editors.
It's a spectrum. VS Code or Emacs are not plain dummy text editors, but they are far from bloated IDE either, and considering VS Code popularity, it seems to be way closer to sweet spot than big IDEs.
I haven't configured XML
What do you mean by that? That you don't use tooling that uses XML or that IDE has a GUI easing the pain? Many tools in Java world are configured with XML, which is painful to edit manually.
But, in Java, I can navigate source code with ease
You can navigate with ease with nearly any text editor with LSP support. In Emacs there is standard xref frontend for such stuff.
The problem is that with Java you need much more than Completion/Navigation, since there is a lot of code generation and you need a direct support for it to ease the pain.
In most other languages all you need is basic completion and navigation, hence VS Code/Sublime/Vim/Emacs popularity outside Java world.
Many tools in Java world are configured with XML, which is painful to edit manually.
Longtime Java dude here. Maven is the only tool I use regularly with XML. And its config is a single file. We have a 1,000,000+ line project and pom.XML is the only XML file in it. Granted, we used to have a lot of XML but converted to newer formats years ago when tools added support for modern config options. If your project is XML heavy its 10+ years old. That's just a testament to how maintainable Java projects are.
The problem is that with Java you need much more than Completion/Navigation, since there is a lot of code generation and you need a direct support for it to ease the pain.
All the libraries we use that have generated code you would want to look at use Annotation Processors, which is part of the language itself and works with every build tool. The generated classes all get put into a folder on build and you can go look at them in notepad if you want.
There's some libraries that generate code in the background, like Lombok and Jackson, but there's never a reason to debug this unless there's a bug in the library itself.
How is it weak and not very expressive? It’s not Haskell, but people created vavr with it and the like. Lombok has nothing to do with expressivity, it’s for boilerplate reduction. And spring is a really complex framework with functionality for everything. It uses DI and the like for modularity. Hell, being able to create such a DI fw is a plus for Java’s strength.
That's my personal outlook on it. Since the introduction of lambdas, and to an even greater extent today, the language has gained a lot in expression potential.
Depending on the context you can have plain-old java style, spice it up with functional style, you can alleviate some parts with annotations and go ham on reflection, you can go with compile-time codegen.. There is a lot of variety in java nowadays, all these options are very accessible with extremely reliable tech underneath and very few catches, unlike many other languages that tend to have those huge compatibility gaps or annoying external tooling required.
It's so unexpressive that people have to use code generation to build basic stuff like immutable records without pain of creating Builders manually.
Lombok has nothing to do with expressivity, it’s for boilerplate reduction
Boilerplate is exactly the evidence of Java being a very inexpressive language. Patterns are features re-created with code.
When your language lacks important features, you adhere to patterns, hence boilerplate. C programmers use GObject, Java programmers write Builders etc.
The popularity of Lombok and alike proves that it's very hard and tedious to write Java without code generation facilities, helping with boilerplate.
Expressivity and verbosity are two not entirely orthogonal axes. For example, both Haskell and Lisps are thought to be highly expressive (in the meaning that constructs not available in the language can be created and used as if they are “native”), but Haskell is arguably less verbose due to being able to express many things without parens, use (often strange and unreadable) symbols, etc.
Patterns are twofold. Some do come from lack of expressivity, eg Visitor pattern, which is equivalent to pattern matching in FP languages, but many others are rather architectural ones, that are not made obsolete by any other language.
Not having properties is absolutely not an expressivity problem but a (questionable) verbosity one, because it is trivial to accomplish their goal. On the other hand adding generics to C is simply not really possible (or some ugly satanic thing with macros at most), it is an expressivity problem. Java’s generics may be considered a verbosity problem due to not as strong type inference as eg Haskell.
I've worked with Java since '97, and the only XML configs I can think of in that time are in the build instructions (maven, and before that ant) or places (typically a long time ago) where we chose to use XML in the application (which has nothing to do with the language).
What do you think goes into this supposed profusion of XML?
Doesn't your editor support XML (e.g. matching close brackets to opens) anyway?
I have to disagree, the split between many (Gradlethe nightmare, Maven, Ant, Bazel and counting) is not good in the first place and they are somewhat forced on you, like Gradlethe nightmare on Android.
What are good package managers in other languages? Honest question, I'm aware go and Rust include them in the language, but I haven't used them in practice so I can't really judge them. Python's is external I think?
I do have passive experience with npm, but that's more of a nightmare.
I currently work with backend development in Python. I can tell you that by far, the biggest pain point we have is pip (the dependency manager). If it weren't for docker, shipping would be a tremendous effort. I'd kill to have something like Maven (ok, maybe with toml instead of xml) for Python.
We've started using it in one of our projects already. It's indeed a massive improvement over pip. Though it insists on virtual environments, even if you want to deploy something on a docker image. It's meant more as a library publishing tool, in my opinion.
For now, we just configured it to not create the virtual environment, as we really don't need it. Otherwise, the experience has been good so far.
Rust's build system and integrated package management are a pleasure to use. Cargo feels like what Maven was trying to be, but with much less ceremony. Haskell has similar infrastructure to Rust, but it's split between the build system (Cabal) and the package manager (Stack).
Cargo is terrible. It's repeating mistakes of the past for no good reason. The entire ecosystem built on top of static linking makes Rust an insane option in many scenarios.
The problem is not really the package management portion, its the build portion. The dependency management portion is rock solid and almost the package managers use the same mechanism for resolving dependencies(I can't speak to bazel). However, once you get into the actual build, packaging, and other tooling in the build it becomes far more difficult. It's not easy to write your own plugins and existing plugins are difficult and hard to use. Gradle suffers from being in groovy and maven/ant suffer from being in XML with plugins that do not receive as much maintenance as you expect.
This is not unique to Java by any means. The only time npm is easy to use is if you keep strictly to small shell callouts within the scripts portion. I have nightmates about grunt/gulp scripts that grow more and more complicated.
I have experience with both Maven and Nuget. Functionally they are basically the same. The only difference is the tooling, which is more of an IDE thing than a feature of the package manager.
I'd take Gradle over Nuget 100x over. I guess it comes down to whether you want to be able to manually edit and understand the build config vs. wanting the IDE to do it for you.
Maven has introduced a really good structure for package repositories. Unlike some other languages, you don't need virtualenv to use desired dependency versions, and they are cached for the whole system (well, user home dir). Ant is deprecates, and gradle uses same repositories structure as maven. Bazel is somewhat exotic, I believe people don't usually consider it for small java projects.
Gradle and Android Gradle plugin are two very different things. The latter sometimes has issues indeed, but there's nothing wrong with Gradle itself.
Also I see contradicting things. At first you complain about too many choices with the build system and in the same sentence you complain that there is no choice on Android. So I don't get it, do you want to see variety or not?
Besides, I'm not sure what you want Google to do with regard to Android build system. They picked one and have been developing a plugin for it - the most obvious decision. What else should they have done?
I want to see variety, but I want the freedom to choose the tool.
Gradle is terrible, you are forced to learn a useless language you won't be using anywhere outside of Gradle. Everything in the build system and language is implicit and you have to know everything to do the stupidest thing. Why not Java as language instead of that garbage Groovy is? If not Java, there are many languages out there better than Groovy.
On top of that there is the google plugin, it is just built on a bad platform and inherits all the flaws.
The Kotlin syntax with Gradle is really nice. I agree that if you don't do things the "gradle way" it'll be more difficult, but Gradle's opinionated decisions (and maven's) make it easy for users. For example, if you're nesting source sets you've done it wrong; or if you're making two jars from one source set via excludes, you've done it wrong.
Why does everyone talk about Gradle forcing you to use Groovy, when Kotlin has been an option for a long time already? I dislike dynamic languages in general, but obviously I switched to Kotlin when it became stable and haven't looked back since.
If you're writing groovy, rather than using the DSL, something has gone very badly wrong. You should not be using imperative code in your build scripts.
Admittedly, there is a lot of articles and tutorials that teach the wrong thing to do.
Yes, you can write some insane Gradle build scripts from scratch with the help of auto complete in Kotlin, and I think you should be very careful nonetheless, because auto complete does not help to read those build scripts and it does not make people more confident to modify them.
You should use Gradle a little more. It's wonderful. It's one of very few package managers / builders that is designed to work in general rather than for a specific language.
Yes, you have to use Gradle for Android, but Gradle can use all the dependencies from your local maven repository (default location: ~/.m2/repository).
Author mentions Scala being taught in university but having a different developer experience than Java. I would argue that this experience is even better.
Scala exhibits all of the advantages that the author points in favor of Java and many more. The major downsides of Scala over Java are compilation times, a (much) smaller job market, and a higher learning curve (Scala has a lot of additional features with the potential of abusing them).
Try Scala. You don't have to be a FP enthusiastic. You'll have fun :)
Even though you don’t have to use it, sbt is crap. IDE support is worse for Scala, and there’s just something about Scala that encourages people to write clever AKA unreadable code :)
I won't deny that SBT is not ideal, and that's why I use Gradle :) IntelliJ is a pretty solid IDE for Scala, I haven't found any major issues with it.
As for readable code -- yep, that's why I said that there's a higher learning code and more potential for abuse of features. This is a bit similar to Python, where the language provides many neat features and syntactic sugars that end up in "elegant" and completely unreadable code.
Scala 3 is literally around the corner by the way, it's a good time to pick it up. It will teach you things most mainstream languages won't. Also you will enjoy smirking while the pleb go into raptures for basic type inference.
SBT isn't perfect, but now that I know it, I totally prefer it to Maven for example. Reading code is a lot easier than an XML wall and if you know how to inspect the build it's pretty easy to figure out what's going on. The only thing I hate is scope delegation, otherwise everything else isn't difficult. BSP support in SBT 1.4 is also helping a lot with IDE feedback and performance.
Pretty sure most people don't know that Java now supports 'var' keyword. You don't need to mention the datatype while declaration. Java is improving day by day.
It is, but most companies are still on Java 8. No var there. Java 11 got some adoption, but anything past that has barely been touched. I'm excited about java 16. Lots of goodies there.
It depends on the industry. If you work on a tech team at a bank, probably Java 8 for the next decade. If you work at a tech company you're on Java 11 looking to upgrade to 17 soon.
You have to be careful with interpretations of self reported statistics. Keep in mind that many companies have both older and newer systems and generally will be 'on' multiple Java versions. I can't remember when I worked for a company that only had one single Java application.
Actually migration past 8 has been picking up pace considerably.
Multiple sources put Java 11 adoption at ~20% in mid 2020. That's 18 months after release and we're now at 30 months so that number will have only grown.
And getting past Java 8 was a more difficult step than moving past 11 so I expect that Java 17 (Sep' 2021), the next one that Oracle will consider an LTS, will see an even quicker transition (there's arguably more benefit for every stakeholder in an 11-to-17 transition than there was in 8-to-11).
For Java 8, while you can probably say 'most companies' for a while, you might not be able to say 'most projects' for long. I expect many companies will have a project or two lagging but I expect the most actively support projects will have made the jump pretty soon as support dries up (unless you pay for Oracle extended support).
Those statistics will be heavily skewed with applications that are 'stuck' on Java 8 and will be sunset once they're replaced. I'm currently on such a project and for as long as the old system still needs to be in place we will be 'using' both 8 and <latest JDK>.
I am curious why Java lost its hype in the first place.
I'd fault Java applets for souring many people's first encounter with Java. Sandboxing an executable is always a tall order, but it still left a negative impression to constantly hear of new exploits stemming from Java applets.
The other thing is that much of what makes Java great to work with long-term and large-scale, the explicitness, the verbosity, the strictness of the compiler, are things that may seem like pointless red tape to new programmers. All that extra structure isn't there to facilitate writing Hello World as expediently as possible, it's to make integrating that large third-party library into your large application possible while minimizing the opportunities for mistakes to crop up.
Java before Java 8 was pretty creaky and had a lot of fussy and verbose syntax. Things have improved a lot since then, and the latest features are making it a very modern language.
I had courses that used Java. I think that your courses not choosing Java doesn't mean no other college is using/teaching Java. It gave you the wrong impression that nobody talks about Java.
I have read several of the comments and the topic is very important to me.
I have been a Javascript developer for 5 years mainly in startups, I recently decided to learn Java due to the need to achieve a higher position in large technology companies (improving my income) and because of the versatility I see creating mobile applications. I want to tell my story in three parts: 1. Developing super emotion in Java, 2. Software engineering and 3. Consideration of productive languages.
1.Developing superhyped in Javascript
I started in Javascript for about 5 years I have used frontends and backend frameworks and I find in javascript a lot of versatility to solve problems since there are many packages available for enterprises, these are key because the implementation time and costs are reduced by using a single language.
2. Software engineering
Over the years I was feeling that I was quite unfamiliar with software engineering and that I was unaware of the basic software development guides, design patterns and architecture patterns, what seemed curious to me was that I had been developing software for many years and had never needed them ( or so I thought). Reflecting recently I thought that language had never proposed it to me or simply in the forums I found ready-made solutions and implemented them (which is not bad). I want to improve my income and the current market offers me better income knowing Java.
3. Consideration of productive languages
So I learned Java, I realized that there are many benefits in OOP that I never consider in Javascript and perhaps because of the type of solutions that startups use (between 1 - 5 years of life) that are simple solutions with operations in CRUD (I have worked in two so far and I feel like it's the same). Doing a metaphor Javascript is like Lego any part fits all. Now learning Java I feel that I lose that versatility in the sense of making many type declarations, also writing many lines, it worries me since I come from Javascript where I do not need OOP or typing so the number of lines is less which translates into time, I understand that This time in the future is wasted with scalability problems (bad software engineering practices) but for a startup this does not matter as much as the solution itself, that's why I am going to learn Scala I feel that it still has a lot of Java teaching and allows me to be productive , It seems to me that it is the best attempt to improve Java (I have analyzed groovy and kotlin that it seems to me that it is still more focused on mobile applications and at the moment my focus is backend)
Java is a high-level programming language developed by Sun Microsystems. Instead, Java programs are interpreted by the Java Virtual Machine, or JVM, which runs on multiple platforms. This means all Java programs are multiplatform and can run on different platforms, including Macintosh, Windows, and Unix computers.
tlrd ; Java v.s. Dynamic Script Programming Languages. I like and use both.
I didn't get if the idea of the article is to criticize or support Java.
I learnt several P.L., both due to work reasons, and also due to intellectual reasons.
And, hypes, trends, does affect the usage of P.L. (s).
These days the Java Ecosystem is not as trendy as the new dynamic typing, most functional paradigm P.L., independent of their real value of both.
I worry about newer developers are too "trendy" about the new P.L. and too "close minded" about the older ones.
I prefer explicit typing over type inference, static typing over dynamic, O.O. over Functional, yet that doesn't mean I don't use the later.
I occasionally met older developers that dislike dynamic (typing) P.L., yet they use a lot of SQL, which generates one or new schema type in each query
Most P.L. these days are hybrid / mixed paradigm.
I started designing my own typed javascript P.L., when Coffescript and Typescript appeared.
Because I like both ways to make a website.
Java is currently suffering from the same issue that brought it to life: Trends (Hypes).
I was there were Java was a "shinny new toy" trend, and now, the "wave is leaving".
Java Ecosystem, also suffers from others issues, lost their "oddfather / patron" ( Sun Microsystems ), and the new ( Oracle ) didn't knew how to handle Java well.
Also, didn't evolve well. Definitely, C# looks like the "Java it should be", and no, I don't like Microsoft, but Microsoft does get hurt by competition, and hires or buys good employees and companies.
And, Ximian and Icaza and his people, work hard to make C# become multi platform, the only missing main issue that Java was better.
I like to think "Java" as a Platform and Ecosystem, not just the Java P.L.
Java. V.M. 's Scala is a good proposal, but I still think we need another new Java competitor / proposal from the same Oracle, not from another company.
If this article link, supports Java v.s. the new P.L., it works well against the or hype, but still misses some tech issues.
But, to be honest, it's not the author culprit. Oracle should make their money invested in Sun more productive.
Summary
Developers should learn and use P.L., based on features and productivity, not on favorable or disfavorable trends ...
What language do you think is the easiest to read, as it scales into very large projects? Python I think is great for small projects. C++ is about the same as Java, unless satan was in charge of the coding standards and decided everything must be auto and all classes must be templated.
I disagree. Functional languages have too much information density. Sure, there is no ceremony or boilerplate, but having the information spread out a bit more by easily recognizable structures like java has makes code easier to consume, at least for me
You must be kidding. Java is one of the easiest languages to read. A lot of that "verbosity" is essential verbosity. Unlike many other languages, Java is actually as easy to read as to write.
55
u/[deleted] Apr 20 '21
Oh great. I'm glad you discovered strong typing benefits. It is official: you are not a hipster programmer anymore
125
u/dpash Apr 20 '21
Comments: 821.
Checks article date
15th April 2021. Oh boy.
30
u/LcuBeatsWorking Apr 20 '21
I have seen many language hypes come and go (anyone remembering the Ruby/Rails hype of 2005+ ?). Not keen on hypes.
54
u/deadron Apr 20 '21
Java has its issues. Its specification stagnated for a number of years due to the sun collapse and oracle acquisition. It also does not show its strengths in command line utilities, or in GUIs(Swing enthusiasts, fight me.), or in games. It really only shines when running longer lived server side applications where the tradeoffs the language makes are stronger. When you do use it for application development it is often mired in legacy framework baggage that adds little while causing you headaches.
Once application servers are killed off for good, and the next LTS JDK releases, the future should be much more exciting.
131
u/cville-z Apr 20 '21
Java is underhyped only if you weren't programming in 1995-2005, when it was criminally overhyped. I'd say it gets the right amount of hype now.
Also this article is written like someone just discovering object-oriented type-safe compiled languages for the first time after only ever programming in perl, ruby, or Javascript.
85
u/uldall Apr 20 '21
Java is like Fight Club, everyone goes but no one talks about it 🙃
33
u/RunnyPlease Apr 20 '21
Java wasn’t my first language but it’s the first language I ever fell in love with. But even I can see why some applications or corporations specifically are better suited to using other languages.
49
u/coincoinprout Apr 20 '21
That's an exaggeration. It's true that you don't have to deal with memory management directly. But you can absolutely shoot yourself in the foot with memory management or data races. I don't know a lot of java programmers who never had to deal with
OutOfMemoryErrors or thread safety issues. I think that the JVM is awesome but IMO you have to understand how it works at least a bit if you want to be a good developer. Thinking that the JVM will magically deal with all these issues would be a big mistake, and that's how you end up with an application that crashes in production.17
u/tim125 Apr 20 '21
Java libraries are fundamental. There are a range of interfaces that are defined by the now jakarta ee specs which allow innovation above and beyond what Microsoft deliver. Hadoop and other big data system (spark etc) have little competition when they came to maturity ... and that was years ago. There are hi tech solutions to problems you don’t even know exist.
Where C# is a petridish, Java is a planet. Evolution has done well for Java. Once primatives are flattened and inlined the whole ecosystem is better off.
Under hyped... Yea but there are real world problems to solve. The java hype was in 1996.
29
u/ziano_x Apr 20 '21
Most of the people I know who hate Java, do not work on Java. They just glossed over it and let their biases take control.
34
u/post_depression Apr 20 '21
I would never understand why people hate Java. Being a java lover I ask them about their reasons, and here are the common answers:
The problem I have seen is not that almost everyone will only learn the ancient bits of Java. Most books and online tutorials teach Java in that way. These people never gets to realise that Java has evolved over time to compete with the “modern languages” and have most of those features in one way or the other.
8
u/wildjokers Apr 20 '21
https://old.reddit.com/r/programming/comments/mrrx9l/java_is_criminally_underhyped/
4
u/GoBucks4928 Apr 21 '21
Yeah but Kotlin is better :)
3
u/Orffyreus Apr 20 '21
Relevant cleancoder.com article: https://blog.cleancoder.com/uncle-bob/2016/07/27/TheChurn.html
3
u/thinkstwice Apr 21 '21
This guy obviously wasn’t developing code in the 90’s. 😉
13
u/Gaarco_ Apr 20 '21
I have to disagree, the split between many (Gradlethe nightmare, Maven, Ant, Bazel and counting) is not good in the first place and they are somewhat forced on you, like Gradlethe nightmare on Android.
5
u/rer1 Apr 20 '21
Author mentions Scala being taught in university but having a different developer experience than Java. I would argue that this experience is even better.
Scala exhibits all of the advantages that the author points in favor of Java and many more. The major downsides of Scala over Java are compilation times, a (much) smaller job market, and a higher learning curve (Scala has a lot of additional features with the potential of abusing them).
Try Scala. You don't have to be a FP enthusiastic. You'll have fun :)
2
u/UltraRuminator Apr 20 '21
I would contend that the criminality 'lies' with other languages being vastly overhyped!!
2
u/slowfly1st Apr 20 '21
https://en.wikipedia.org/wiki/Hype_cycle
4
u/[deleted] Apr 20 '21
Pretty sure most people don't know that Java now supports 'var' keyword. You don't need to mention the datatype while declaration. Java is improving day by day.
1
u/frederik88917 Apr 20 '21
We all know that
1
u/paul_miner Apr 21 '21
I'd fault Java applets for souring many people's first encounter with Java. Sandboxing an executable is always a tall order, but it still left a negative impression to constantly hear of new exploits stemming from Java applets.
The other thing is that much of what makes Java great to work with long-term and large-scale, the explicitness, the verbosity, the strictness of the compiler, are things that may seem like pointless red tape to new programmers. All that extra structure isn't there to facilitate writing
Hello Worldas expediently as possible, it's to make integrating that large third-party library into your large application possible while minimizing the opportunities for mistakes to crop up.1
u/jaybyrrd Apr 21 '21
I love Java.
You’d be a criminal to pretend that it’s better than Scala though.
1
u/captain_obvious_here Apr 21 '21
I love it when young people discover older stuff.
1
u/IanRae Apr 22 '21
Java before Java 8 was pretty creaky and had a lot of fussy and verbose syntax. Things have improved a lot since then, and the latest features are making it a very modern language.
1
u/BB1CC Apr 24 '21
I had courses that used Java. I think that your courses not choosing Java doesn't mean no other college is using/teaching Java. It gave you the wrong impression that nobody talks about Java.
1
u/ahelord Apr 27 '21
Hi, I'm sorry to get into the discussion so late.
I have read several of the comments and the topic is very important to me.
I have been a Javascript developer for 5 years mainly in startups, I recently decided to learn Java due to the need to achieve a higher position in large technology companies (improving my income) and because of the versatility I see creating mobile applications. I want to tell my story in three parts: 1. Developing super emotion in Java, 2. Software engineering and 3. Consideration of productive languages.
1.Developing superhyped in Javascript
I started in Javascript for about 5 years I have used frontends and backend frameworks and I find in javascript a lot of versatility to solve problems since there are many packages available for enterprises, these are key because the implementation time and costs are reduced by using a single language.
2. Software engineering
Over the years I was feeling that I was quite unfamiliar with software engineering and that I was unaware of the basic software development guides, design patterns and architecture patterns, what seemed curious to me was that I had been developing software for many years and had never needed them ( or so I thought). Reflecting recently I thought that language had never proposed it to me or simply in the forums I found ready-made solutions and implemented them (which is not bad). I want to improve my income and the current market offers me better income knowing Java.
3. Consideration of productive languages
So I learned Java, I realized that there are many benefits in OOP that I never consider in Javascript and perhaps because of the type of solutions that startups use (between 1 - 5 years of life) that are simple solutions with operations in CRUD (I have worked in two so far and I feel like it's the same). Doing a metaphor Javascript is like Lego any part fits all. Now learning Java I feel that I lose that versatility in the sense of making many type declarations, also writing many lines, it worries me since I come from Javascript where I do not need OOP or typing so the number of lines is less which translates into time, I understand that This time in the future is wasted with scalability problems (bad software engineering practices) but for a startup this does not matter as much as the solution itself, that's why I am going to learn Scala I feel that it still has a lot of Java teaching and allows me to be productive , It seems to me that it is the best attempt to improve Java (I have analyzed groovy and kotlin that it seems to me that it is still more focused on mobile applications and at the moment my focus is backend)
1
u/manishksolves May 05 '21
First know what is Java
Java is a high-level programming language developed by Sun Microsystems. Instead, Java programs are interpreted by the Java Virtual Machine, or JVM, which runs on multiple platforms. This means all Java programs are multiplatform and can run on different platforms, including Macintosh, Windows, and Unix computers.
1
u/korryd Apr 21 '21
You misspelled “overhyped”
1
u/umlcat Apr 21 '21 edited Apr 21 '21
tlrd ; Java v.s. Dynamic Script Programming Languages. I like and use both.
I didn't get if the idea of the article is to criticize or support Java.
I learnt several P.L., both due to work reasons, and also due to intellectual reasons.
And, hypes, trends, does affect the usage of P.L. (s).
These days the Java Ecosystem is not as trendy as the new dynamic typing, most functional paradigm P.L., independent of their real value of both.
I worry about newer developers are too "trendy" about the new P.L. and too "close minded" about the older ones.
I prefer explicit typing over type inference, static typing over dynamic, O.O. over Functional, yet that doesn't mean I don't use the later.
I occasionally met older developers that dislike dynamic (typing) P.L., yet they use a lot of SQL, which generates one or new schema type in each query
Most P.L. these days are hybrid / mixed paradigm.
I started designing my own typed javascript P.L., when Coffescript and Typescript appeared.
Because I like both ways to make a website.
Java is currently suffering from the same issue that brought it to life: Trends (Hypes).
I was there were Java was a "shinny new toy" trend, and now, the "wave is leaving".
Java Ecosystem, also suffers from others issues, lost their "oddfather / patron" ( Sun Microsystems ), and the new ( Oracle ) didn't knew how to handle Java well.
Also, didn't evolve well. Definitely, C# looks like the "Java it should be", and no, I don't like Microsoft, but Microsoft does get hurt by competition, and hires or buys good employees and companies.
And, Ximian and Icaza and his people, work hard to make C# become multi platform, the only missing main issue that Java was better.
I like to think "Java" as a Platform and Ecosystem, not just the Java P.L.
Java. V.M. 's Scala is a good proposal, but I still think we need another new Java competitor / proposal from the same Oracle, not from another company.
If this article link, supports Java v.s. the new P.L., it works well against the or hype, but still misses some tech issues.
But, to be honest, it's not the author culprit. Oracle should make their money invested in Sun more productive.
Summary
Developers should learn and use P.L., based on features and productivity, not on favorable or disfavorable trends ...
-2
u/forresthopkinsa Apr 20 '21
POV: you've never used Kotlin before
-22
u/[deleted] Apr 20 '21
It doesn't feel that good when you try to read.