News for hackers. Stuff that matters.
Re:Java Is Underhyped by king_magic on Thursday April 15, 2021 @10:27PM (#26828690)
The sheer verbosity of Java is just unbearable when you're used to Python/Go/Swift/etc.

No, Java is just about as hyped as it needs to be. Which is to say, it's more or less fine. Not great, not terrible. Middle of the road at best.

Re:Java Is Underhyped by coldtea on Friday April 16, 2021 @03:36AM (#26830754)
>The sheer verbosity of Java is just unbearable when you're used to Python/Go/Swift/etc.

I'm used to Python (and some Go) for decades, and the verbosity of Java is a non-issue to me.

I'd rather have the speed, type safety, and refactoring tools support, over Python... (not to mention the much better packaging situation).

I'd still prefer Python for smaller programs, basically because of the startup time and quick write/try cycle. But for larger stuff, I'm not so sold, and I've been doing them (in Python) for decades...

Re:Java Is Underhyped by eitland on Friday April 16, 2021 @02:19AM (#26830239)
Or you could say nobody who has ever had a working IDE setup could ever go back to Python.

Saying this as someone who Java after Python and other languages.

Re:Java Is Underhyped by vips7L on Saturday April 17, 2021 @09:10AM (#26843973)
I honestly don't know how anyone could think Go is less verbose than Java.

Manual for loops? No generics?

Re:Java Is Underhyped by eklavya on Thursday April 15, 2021 @10:31PM (#26828715)
I am sorry, Go? That can’t be right. I even doubt it’s any more verbose than python or swift. You CAN make it verbose that’s for sure.
Re:Java Is Underhyped by nemothekid on Thursday April 15, 2021 @10:38PM (#26828758)
>You CAN make it verbose that’s for sure.

No true scotsman? Even if you want to argue that Java CAN be made more terse, the vast majority of Java that exists today is incredibly verbose. Even running a Java program is verbose. Java is the only language I've used where it's more common to have a shell script that starts your Java program than just running ./helloworld.

And yes, Go is less verbose than Java. Go might require some boilerplate, but it is certainly much less verbose than Java.

Re:Java Is Underhyped by LaserToy on Thursday April 15, 2021 @10:43PM (#26828789)
Verbosity is not a problem in large code bases. Speed of understanding and debugging of what somebody else wrote is.

So, less magic is better. I will take Java codebase over Scala or Python every time, unless it is a toy script which is 100 lines

Re:Java Is Underhyped by cle on Thursday April 15, 2021 @10:58PM (#26828900)
Every significant Java codebase I've worked in has had incredible amounts of magic. Between AOP, DI frameworks, APT, reflection, proxies, SPI, Lombok compiler hacks, dynamic classloaders, etc., there is a LOT of magic flying around and it can be quite hard to understand what will happen at runtime.
Re:Java Is Underhyped by tirrex on Thursday April 15, 2021 @11:17PM (#26829018)
I’m not a backend java dev but whenever I take a look at java web projects which use spring/jsf/jsp etc frameworks, docs say to handle a request, write a method with that signature, we’ll call it when there is a http request. I always want to know enterence/exit points of a network message but that is impossible with these fancy frameworks. It is pure magic.
Re:Java Is Underhyped by inshadows on Friday April 16, 2021 @03:34AM (#26830738)
Don't forget XML DSLs. Or are we past that?
Re:Java Is Underhyped by esarbe on Friday April 16, 2021 @06:10AM (#26831912)
This is what drove me away from Java; the ungodly amount of magic that's required to make it economic. If it all works, it's fine. But as soon as something fails... Get yourself ready from some frustrating hours.
Re:Java Is Underhyped by fomine3 on Friday April 16, 2021 @12:51AM (#26829634)
This. Java communities tried to solve redundant code problem by complex, hard to recognize way.
Re:Java Is Underhyped by smitty1e on Friday April 16, 2021 @03:29AM (#26830688)
Still got PTSD from a Hinernate codebase that had all sorts of initialization magic afoot.

Who needs CPP macros when you've got reflection?

Re:Java Is Underhyped by LaserToy on Friday April 16, 2021 @12:06AM (#26829332)
I’m talking about the language, not frameworks.

AOP sucks because it is paaaain to debug, proxies are magic. There is Dagger that solve some stuff

Re:Java Is Underhyped by pbadenski on Friday April 16, 2021 @09:13AM (#26833455)
ALL Java developers should be required to watch this course (it's Free):

https://software-mastery.teachable.com/p/uncommon-sense

FYI: I am NOT an author of this course.

Re:Java Is Underhyped by tirrex on Thursday April 15, 2021 @11:25PM (#26829062)
Java style verbosity hurts readability. That’s the most important issue with Java imho.

Take a look at a http server one in Java and one in C. Readability difference is crazy.

My company is in transition from Java to C, for bunch of stuff just for performance reasons. So, I debug similar projects time to time both in Java and C, http server, in memory cache, iot server etc. After seeing both, I just think although Java has great tooling, it drives developers to write unreadable code.

Re:Java Is Underhyped by LaserToy on Friday April 16, 2021 @12:08AM (#26829340)
I mentioned C as a language of choice. Cool kids are picking node js and esoteric Closure, not C
Re:Java Is Underhyped by twic on Friday April 16, 2021 @05:26AM (#26831582)
> And yes, Go is less verbose than Java

No, this is utter, utter nonsense. I have written plenty of both, and it's not even close.

If you are going to press this extraordinary claim, you need to supply at least some evidence for it.

Re:Java Is Underhyped by eklavya on Thursday April 15, 2021 @10:54PM (#26828867)
We should keep in mind the kind of features, performance, observability the jvm can provide, compare that with the other runtimes and then see if the script to execute is too much :)
Re:Java Is Underhyped by wing-_-nuts on Friday April 16, 2021 @11:17AM (#26834915)
Go's error handling is painfully verbose. Go's lack of generics leads to passing empty interfaces everywhere (come on proposal!). Don't act like go doesn't have it's warts. If it wasn't backed by google it wouldn't be nearly as popular as it is.
Re:Java Is Underhyped by da39a3ee on Thursday April 15, 2021 @10:37PM (#26828752)
Perhaps verbosity isn't the right word, but having to put every function in a class (in a correspondingly-named file) feels extremely cumbersome to people who grew up with languages that just have functions and weren't exposed to Java early on.
Re:Java Is Underhyped by bpodgursky on Thursday April 15, 2021 @10:44PM (#26828795)
Nobody who has ever written error handling in Go could possibly downvote this comment. Holy moly, the error checking after EVERY interesting method call. Talk about verbose.
Re:Java Is Underhyped by thiht on Friday April 16, 2021 @03:47AM (#26830825)
It's useful verbosity. Java's verbosity is misplaced, which is worse.
Re:Java Is Underhyped by kaba0 on Friday April 16, 2021 @12:13PM (#26835742)
That’s just false
Re:Java Is Underhyped by praptak on Friday April 16, 2021 @09:16AM (#26833479)
Go's error checking is the 2020's equivalent of "Python's significant whitespace". Both are pretty common and rather shallow critiques of a language.
Re:Java Is Underhyped by yongjik on Thursday April 15, 2021 @10:48PM (#26828824)
You can write verbose code in any language, but most other languages don't consider it normal to name a class LangDetectLanguageIdentifierUpdateProcessorFactory. (Random example from an open source framework.)
Re:Java Is Underhyped by thu2111 on Friday April 16, 2021 @05:42AM (#26831722)
Eh, any sufficiently large or complex codebases will get ridiculously long names at some point. Here are some from a famous C API (Windows):

    CoMarshalInterThreadInterfaceInStream

    D3D12_GPU_BASED_VALIDATION_SHADER_PATCH_MODE_UNGUARDED_VALIDATION 

    RtlWriteDecodedUcsDataIntoSmartLBlobUcsWritingContext
Or how about:

    GtkColorSelectionChangePaletteWithScreenFunc

The alternative is things having names that aren't actually descriptive at all, which is not clearly better.
Re:Java Is Underhyped by madia_leva on Friday April 16, 2021 @07:02AM (#26832335)
Or have a good package system... If you use a language with import with aliases, you don't need all that noise.
Re:Java Is Underhyped by thu2111 on Friday April 16, 2021 @10:19AM (#26834196)
Java has such a system but people write long class names anyway, because people don't like to have too many types with identical names distinguished only by namespace. You can do it but it's a bit questionable to what extent you should.
Re:Java Is Underhyped by koolba on Thursday April 15, 2021 @10:52PM (#26828857)
But how else will your app automatically detect and inject its enterprise LangDetectLanguageIdentifierConfligurator at startup?
Re:Java Is Underhyped by baby on Thursday April 15, 2021 @10:49PM (#26828834)
I just got some flashback reading that long string, and my heartbeat raised. The namespacing system is also a nightmare

Com.prout.shit.lol...

Re:Java Is Underhyped by koolba on Thursday April 15, 2021 @10:54PM (#26828869)
Namespacing in reverse dns order is something Java got right. It naturally segments things and you can immediately see the relative provenance of classes.

It’s just impossible to use without editor support. Nobody who cares for their sanity can type out those package names manually. I think even Gosling said as much.

Re:Java Is Underhyped by eurasiantiger on Friday April 16, 2021 @08:46AM (#26833193)
Just trying to find files relevant to some functionality is incredibly difficult without full-text searching all the files. Namespacing is fine but why must the entire path be reflected in directory structures?
Re:Java Is Underhyped by for_xyz on Saturday April 17, 2021 @05:48AM (#26842971)
To prevent half assed refactoring in the first place where only namespaces and classes get refactored while folders and filenames remain as they were. It would just further confuse new devs on the project.
Re:Java Is Underhyped by dmingod666 on Friday April 16, 2021 @08:24AM (#26832991)
or as the saying goes, "you can write java in any language".
Re:Java Is Underhyped by eurasiantiger on Friday April 16, 2021 @08:49AM (#26833218)
Making JavaScript turn into Java bytecode is not a magical experience.