Java Is Underhyped
761–770 of 808 posts
Re: Java Is Underhyped
#762For my use cases, Java has all the wrong compromises: - not high level enough to compete with Python/Ruby/JS/PHP, etc - not low level enough to compete with Rust/D/Nim/Zig - not specialized enough to compete with Erlang/R/Go/Julia - not opinionated enough to compete with Lisp/Haskell So why use Java ? It's good, it's fast, it's productive, it's well supported, battle tested and documented for decades with a huge pool…
Re: Java Is Underhyped
#763Earlier quoted context omitted.
Nobody has started a project with Ant in the last decade. Of all the Java projects on Github Ant is probably not even 1%. > Oh and now I have to make it work in the IDE too, click through a billion menus and dialogs, You click "Project from existing sources" in IntellIJ and it will recognize both Maven and Gradle projects and just work? Sync the dependencies? configure runtimes and classpaths? What? With Maven and Gr…
I'm talking about a maven project I have to use sometimes at work. Let me walk you through all the shit I had to do: - Install and set the right java version system-wide - Copy some config files for the project system-wide (granted, this is not java specific, but still) - Click in some IDE menu to enable some build settings - Click in some IDE menu to install some "Lombok" plugin - Click in some IDE menu to select th…
The run configuration can be automatically created by Intellij by attempting to execute a runnable class. You only need to set program args and env vars if needed - and that would be true for ANY language or program.
The spring loader path appears to be specific for this project.
The run logs are independent of Java. Thats just getting program logs.
There is no need to maven-sync and rebuild-project multiple times, unless you are explicitly refactoring the project module/build structure. Once you have imported a maven project, you can simply click build.
Re: Java Is Underhyped
#764Earlier quoted context omitted.
It’s pretty much an import project and done. If not, then someone really fcked up that build file.
But this happened to me every time I had to use any java project over the years. Maybe I'm just unlucky.
Re: Java Is Underhyped
#765Earlier quoted context omitted.
> no value types or low-level memory access. i dont think you need value types at all, and you can simulate it by using byte buffers with an abstraction on top of it. After all, what's the difference between value types and a byte array? As for things like low level memory access - you also don't need that in most cases. Graphics libraries will give you enough access. And for any other case, you can always JNI into n…
Why even use a high language at all when you can just write the assembly directly? Clearly you can write "Java" that is patently unsafe in an effort to eke out some performance, but this is not what most people would consider reasonable or desirable. When writing Java, you almost always want to go with the flow, and that at the moment means creating objects. The general fix for this is to have good abstractions for p…
for the parts that don't need high performance. And for leveraging existing libraries, if any are suitable.
Re: Java Is Underhyped
#766Earlier quoted context omitted.
Well, it does considerably more things than a hello world python app. So at least compare it to Python’s full blown backend server with ORM and the like.
Django: zero dependencies for years, you could literally copy paste the code and it worked, ORM included. It now has 2 dependencies. It is a 1000 times easier to use than hibernate, despite being one of the worse ORM in Python. That the problem with old Java libs like Swing or Hibernate: they have been designed for the 90' and don't leverage the potential of what a modern Java version can do.
There are many modern java libraries that are very lean and mean out there and package into small-sized redistributable assemblies.
Re: Java Is Underhyped
#767Earlier quoted context omitted.
"IFactoryRepositoryLocatorBullshit" really has nothing to do with Java the language. That's just how some developers choose to design their programs. What specifically is Java terrible at? I find Java to be as expressive as most mainstream languages. Certainly no less expressive than, say, Python or JavaScript.
>Certainly no less expressive than, say, Python or JavaScript. Java can't even have a free standing function without 6 lines of boilerplate minimum and 2 levels of indentation to start. Nominal static typing with weak generics and no almost no compile time programming support - you end up mucking with reflection or code generation if you want to do anything metaprogramming related or non trivial higher order function…
Function fn = parameter -> parameter + " from lambda";
Using annotations and cglib, you can do all the meta-programming you want.
Re: Java Is Underhyped
#768Earlier quoted context omitted.
Optionals can be null, so dereferencing them can still cause an NPE. Also the syntax is horrible. I know the excuse that they are just meant to be used to wrap the return value of a function that might be null, rather than as a guard against NPEs, but that just means we’ve got a crappy, verbose Optional class ... and NPEs. It was the most half assed attempt to fix the billion dollar mistake [0] anyone could have come…
Sorry but of course Optional can be null because of Java’s type system. Objects can be null, Optionals are objects. I’d rather it have been different from the beginning but now that it’s here it’s really not something that should change. Just never let anyone get away with returning a null for an optional... though I can imagine the scenario where in. A framework that might cause it to happen. To have special rules f…
I don’t really get your other arguments. I think the problem has been solved better in other languages including Swift, Kotlin and Rust, and Java could have learned from them, but didn’t. I can’t see why direct language support couldn’t have been added to solve this “billion dollar problem”. Even the Elvis operator would have helped.
Re: Java Is Underhyped
#769Earlier quoted context omitted.
It needs an ide as much as any other language. Java programmers are just lucky that they have the best IDEs around.
Go was perfectly usable without an IDE, before gocode broke. And I'd still rather program C without any help than Java.
And that is your opinion, not shared by many. There is nothing inherent in the language that makes it hard to write from a text editor. It’s definitely not made for scripting, but with like 4 additional lines you have to write as a main method, I wouldn’t call it infeasible.
Re: Java Is Underhyped
#770Earlier quoted context omitted.
All your projects are belong to that one version of the JDK. Great success.
No success is greater than 100 different projects needing 100 different JDKs on the same machine. But somehow i don't have a problem building an android app in its own java, while the backing service is done in a completely different jdk. It's not ideal as i would want the latest language features in the android side, but that is an android problem.