40 comments

  • dakiol a day ago ago

    I worked briefly with Java/Kotlin a couple of years ago. The language is nice (better than I remembered it). What’s absolutely awful is the build tools around. I hate gradle. It’s overly complicated. The whole bom, settings gradle, build gradle, jars, etc. Nonsense.

    • dcminter a day ago ago

      I've never understood the enthusiasm for gradle over maven. My best guess is that some people just hate XML that much

    • jryan49 a day ago ago

      Gradle is insane. To get anything non-trivial done requirement an enormous amount of effort. I still use it though... :/

      I'm very interested in trying bld https://rife2.com/bld

    • palata 17 hours ago ago

      > I worked briefly with Java/Kotlin a couple of years ago. The language is nice (better than I remembered it).

      Note: Java and Kotlin are two different languages :-)

      > I hate gradle. It’s overly complicated.

      People hate build systems, that's how it is.

    • jemiluv8 a day ago ago

      That was also a pain point for me. That was even before I started using tools like npm to install packages. I was building something with the Swing library and needed to simply add packages to a Java project. Felt like I needed a phd to be able to do that whereas in other places - it was just a command away.

  • jauntywundrkind a day ago ago

    I've been sort of thinking the same. The Context Dependency Injection stuff was so great, allowed creating things on demand and in different scopes of demands so easily. Jax-rs annotations mostly worked fine & had sufficient hooks to make API writing pretty easy.

    I never really was super concerned about verbosity. LLM's should help here yes.

    Maven was an interesting blessing and a curse. Theres so many plugins that do so many various things. It took me a lot of my Java career before I stopped trying to find good docs and references & started just diving into the source to see how plugins worked: it freed me from a lot of feelings that everything was mystical & special & showed me many plugins were quite direct & simple, with a few outliers that did ludicrously many things (usually in a bad way).

    the top post is pretty vague about what people think they might want or enjoy from Java today. I'd be curious to know more specifics about what folks think are highlights.

    Also for the record I left around when java 8 was finalizing, IIRC? Long time.

    • zahlman a day ago ago

      > The Context Dependency Injection stuff was so great, allowed creating things on demand and in different scopes of demands so easily.

      OP is currently working in Python, so that seems to me like a wild justification to go back to Java.

      Elsewhere ITT someone is praising Java for having the ability to keep large codebases organized and comprehensible. But my experience of Java was that the overall boilerplate, focus on classes, manifest typing, functions not being first-class objects, etc. make the codebase large. Then it gets ballooned even further with systems designed to introduce dynamism into a fundamentally static language.

      As I've pointed out in other threads before, "dependency injection" in a dynamic language is approximately a fancy term for "passing an argument to a function". Oh, but it already looks for a global and you don't want to rewrite it for some reason (even though your compilation step is trivial)? That can be addressed with a pretty small decorator. It seems like a lot of why these frameworks exist in Java is so you can reuse implementations of "design patterns" that fix problems Python doesn't have in the first place. By the way (since I just checked it out of curiousity), the code for the Spring framework is comparable in length to the entire Python standard library, including tests.

    • MBCook a day ago ago

      To whatever degree I dislike Maven, I look at the JS ecosystem that I also work in and miss having such a well built thoughtfully designed tool that most everyone uses.

  • drinkcocacola a day ago ago

    Java is an amazing language, but about 4 years ago I moved to Kotlin (back-end): It has all the powerful Java features but it is way simpler to write and also nullability is embedded in the language (no more @NonNull @NotNull Optional<T> stuff). You might find a balance: the power of the JVM and its ecosystem that you can access through a beautiful language that is Kotlin.

  • austin-cheney a day ago ago

    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.

    • callamdelaney 8 hours ago ago

      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.

    • jemiluv8 a day ago ago

      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.

  • MBCook 2 days ago ago

    I’ve never left Java, but it looks like you left before Java 17 which brought a whole lot of nice features compared to 11, and 11 would have just come out when you left.

    11 itself had some nice stuff over 8, which I’m guessing may have been what you were on.

  • RagnarD a day ago ago

    I've written a lot of Java in years past but I focus on C# these days. I suggest looking instead at the .NET ecosystem, focused on C# as the language and the huge library support for it - and basically all of it compilable to WASM in the browser via Blazor if you want to do web dev with it instead of JavaScript/Typescript.

  • ssousa666 a day ago ago

    I recently joined a company that writes Python after working for a Kotlin shop for the past four years. I miss Java/Kotlin every single day. I have no gripes with Python itself and I enjoy writing it, but I've still never seen a large python codebase that remains as coherent, structured and understandable as the average large JVM language codebase. It's as if the structure of the language itself materially informs the structure of the codebase as it grows.

    • jemiluv8 a day ago ago

      My Two Cents

      You moved from a typed - super object oriented/functional language/platform to a dynamic/untyped mostly procedural/functional language

      Dynamic and untyped languages always had this issue - coherence, structure in large projects (without enforcing project wide conventions). Without strong conventions, the codebase will naturally grow in weird unrestrained ways. Whereas with the Java/Kotlin ecosystem, even things like naming of class files has conventions enforced by the compiler so you won't open a file like Person.class and find a People class defined within. Without enforcing conventions, that's what you get in python.

  • trenchpilgrim a day ago ago

    Java doesn't suck anymore. Java 25 will be out this month, try it with a Jetbrains IDE.

  • palmfacehn a day ago ago

    Didn't you find the verbose style readable when you opened a project after a long time?

    For me the time spent coding is the last step. The more important task is always in identifying a problem worth solving and formulating what I hope to be a coherent design.

    The actual typing, while tedious, is the least important part. Just the same, I am sometimes feeding a snippet to a LLM and having it fill out the tedium. Results vary, but the verbose style and longWindedDescriptiveNames seem to help. A few inline comments pick up the rest. The LLM will also expand these into Javadoc type comments.

  • GianFabien a day ago ago

    My main gripe with Java is not the language, but the organizations that still write their systems in it. I just don't want to go back to working for banks, insurance cos, govt departments.

    • esseph a day ago ago

      It's shocking how much of the world runs on old java code on tiny Linux systems

    • decafninja a day ago ago

      Isn’t Java also used all over Silicon Valley? Maybe not the latest and hippest small startups, but still in many other more established orgs including FAANGs.

      IMHO what you describe is more attributable to .NET.

  • ycombinatrix 2 days ago ago

    Java was the primary programming language of not just my career, but my entire life. It almost feels like comfort food to me.

    Though I have moved on to Golang at work & Rust at home, I will always have a soft spot for Java.

  • zahlman a day ago ago

    This logic makes no sense to me. Names aren't an inherent property of languages; the names you didn't like come from either someone else's "framework" or your own design decisions. Lots of Java code has short names (including single-letter iteration variables), and lots of Python code has long names — for example, the standard library `email.errors` has a class called `InvalidMultipartContentTransferEncodingDefect`. The number of things to name, meanwhile, is purely a consequence of the problem domain, how you model it, and how you factor the code.

    "Give me a name for this thing" is the last micro-managing coding task I would assign to an LLM, because the entire point of the name is to express my own intent behind the code.

    Besides which, you haven't identified something you actively dislike about Python, just that a problem you supposedly used to experience in Java is supposedly ameliorated now.

  • majora2007 a day ago ago

    Java is quite popular, so it's easy to go back. But try C# out. It's years ahead of Java in performance, features, and syntax quality.

    I've been doing .NET for years and had to spin up a Java Spring Boot app and it was so painful compared to .NET (esp maven/gradle vs nuget).

  • matt_s a day ago ago

    I used to do Java about a decade ago and because it was in a corporate environment, add about 5+ years of using outdated Java on top of that. Web applications are what I do, have been doing for 25 years and I use Ruby/Rails now.

    I do want to do something meaningful/professional with Go but haven't gotten around to trying it out. I also sort of feel most programming language additions aren't game changers these days. Much like smart phones, the killer feature days are over, small incremental additions are nice.

    The killer feature to me is using AI for tedious tasks or syntax I don't remember and in that respect I do wonder if Java would be easier to deal with than what I remember.

  • haspok a day ago ago

    The thing is, if you last looked at Java in 2018, prepare for a nice surprise. I mean, we were at version 11 back then, the language has made advances in leaps and bounds.

    Just to name a few: half of ML is here (records, pattern matching), we have virtual threads and soon structured concurrency, ZGC, and many more. Project Valhalla (value classes) has been long in the making, hopefully landing in a few years.

    Frankly, I had worked with Kotlin and Scala in the past, but nowadays I barely see the need. Yes, Kotlin has if-expressions and null safety and immutable collections, Scala has its type system, but there are also many compromises, and to be honest, these alternatives look less and less appealing as time passes.

    • andy800 20 hours ago ago

      Honest question, going back to Java, dont you miss scope functions (let, apply, also, etc)? Extension functions? Using sealed classes and "when"? I am happy to see Java (and the JVM) improve but it still seems to be missing some of Kotlin's best language features.

  • markus_zhang 17 hours ago ago

    I wish I could write C for $$$. My brain is too fried after work+kid for C. Yesterday I spent a couple hours to write a section of my meter to read literal strings without escaping chars. Should only take some 30m at most.

  • bullen a day ago ago

    I never left, just learned C/C++.

    J2ME > J2SE > J2EE (that I never used)

    The JVM is the final emulator.

    I think everyone should write their own minimal JVM before judging?

  • jryan49 a day ago ago

    Java is great right now. Lots of updates, performant, simple language, Intellij is amazing. There is not as much boilerplate as there used to be. All the enterprise stuff has died down quite a bit and you have options now with microframeworks and such.

  • muzani a day ago ago

    At this point, I've used Kotlin longer than I've used Java. There's some new features in Java like nullables, but they're still too verbose. If you like the style of Java with a little functional flavor, Kotlin is about right. If you like the OO stuff, then C# seems to do that better.

  • moi2388 a day ago ago

    I’m sorry, you think Python helped us invent LLMs and without it we wouldn’t have? Are you serious right now?

    You do realise the Python libraries which work in this space are written in C, right?

    Java wasn’t just too verbose, it had bad IDEs and build systems.

    If you want to go back, might I suggest Kotlin or C#?

    • Pet_Ant a day ago ago

      In my books…

      I love Maven. I cannot think of another tool of that age that has afed as gracefully.

      Java IDEs are really among the best but I imagine C# in Visual Studio or Smalltalk might really be better.

      That these are someone’s problems with Java… is pretty wild. But we all have our own experiences.

    • soganess a day ago ago

      I hate Python more than anyone I know. My nightmares are filled with people repeatedly chanting "programming is done by consenting adults." Hearing someone say "Pythonic" as a synonym for clever/good, or having someone explain their latest "genius" GIL workaround... boils me.

      So it gives me no pleasure to say this, but one would have to be a complete fool to believe Python wasn't absolutely instrumental in the AI revolution. I'd go as far as to say Python is the reason data science is not just more software engineering. NumPy/Pandas/SciPy/TF/Torch/etc core could be written in $SPACE_ALIEN_WAY_BETTER_3000 for all it matters. If they were not built for Python ingestion, they wouldn't have been used by most of the world.

      There is some special sauce in Python that clicks with people. Something in the looseness and metaphorical play between the joints, I think. Pretending otherwise is that willful ignorance some software folks have when their toy is no longer the shiniest.

      (Also, sure Maven sucked, but saying Java had bad IDEs? IntelliJ or death! Or, you know, death until something better comes along)

      • moi2388 a day ago ago

        Had, not has. Eclipse was horrible imo.

        The libraries you mentioned are written in c.

        Id go so far that everything bad about the current state of AI, including its lack of security features is exactly because Python “developers” wrote it.

        To each their own I guess..

  • MarkMarine a day ago ago

    Same, but I need to circle in on a good framework that is dead simple, not Spring. AOP is not handled well by the LLMs.

  • kopos a day ago ago

    Why not consider Clojure?

  • CopyOnWrite a day ago ago

    Programmed over the years in almost all mainstream programming languages at one time or another.

    Saying this, Java was and is in many ways one of the best ecosystems to write software out there, if not the best (when it comes to server side software).

    Maven is my favorite build systems so far: Default directory layout means everything has its place, IDEs can easily open any kind of Maven project, and being declarative, one can easily analyze pom.xml files. (I hate writing XML and I still like Maven.)

    The next thing is Javas standard library. Well documented and big. Has it better and worse parts? Sure! But what people which never used a language with a good standard library don't get, is that even a bad standard library which is widely used is far better, than the npm-of-the-week clusterfuck, which means that nobody can read three lines of code and really understand, what is happening.

    The IDEs are top notch, and you get even free ones (NetBeans, Eclipse) which can rival JetBrains and Visual Studio easily.

    ... and finally, Java is the only language that I know of, which has multiple strong companies and initiatives behind it, thanks that nobody trusts Oracle (rightfully).

    Finally, Java code also got shorter, DI style is IMHO a very good default in any programming language (OOP, FP, Imperative), the community settled mostly on JUnit, so there are never discussions which of the 23 competing test frameworks to use...

    In the end, there is a lot of rightful criticism of Java (historical baggage, too late when it comes to AOT, no modern GUI frameworks and a steep learning curve). Java getting new features with the new JDK releases is kind of double edged sword: Many things are good ideas, but they make the language more complicated at the same time.

    The verbosity was IMHO never a big thing, because Java was always meant to be used in an IDE, for bigger projects explicit trumps implicit and finally newer revisions introduced stuff like 'var' statements etc.

    It is kind of sad, that the Linux community never really jumped/accepted Java for desktop development (which might be explainable, when looking back at the lack of speed of Java in the 90s and the disastrous Solaris Java apps which were simply to slow to be usable).

    Anyway, for work I am now using Golang, and it is hilarious how many lessons Golang did not learn from Java, when it comes to language design, although the tooling is top notch and the standard library has at least almost everything needed for writing backend services.

    I don't see Java making a comeback, and I don't see anything modern going to replace java at the same time.

  • cbeach a day ago ago

    Consider Scala rather than Java. After a decade of enterprise Java development I decided to pivot to Scala after seeing the side-by-side code examples in the Play Framework documentation. Scala code is much more succinct and expressive than Java.

    The gap has narrowed in recent years, but all the new features of Java have been there for years in Scala, and with neater syntax in Scala. Many Java design patterns are built into the Scala language itself, and the type system is phenomenally powerful. It’s a language where I am constantly learning, even ten years in. It’s wonderful.

  • palata 17 hours ago ago

    > Python helped us invent LLMs - it's quite possible if it didn't exist we would never had invented them.

    Sorry, but this is nonsense.