33 ms·
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'
by king_magic 5y ago
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.
- eklavya 5y agoI 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.
- da39a3ee 5y agoPerhaps 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.
- nemothekid 5y ago>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.
- LaserToy 5y agoVerbosity 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
- cle 5y agoEvery 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.
- tirrex 5y agoI’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.
- LaserToy 5y agoI’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
- fomine3 5y agoThis. Java communities tried to solve redundant code problem by complex, hard to recognize way.
- smitty1e 5y agoStill got PTSD from a Hinernate codebase that had all sorts of initialization magic afoot. Who needs CPP macros when you've got reflection?
- inshadows 5y agoDon't forget XML DSLs. Or are we past that?
- esarbe 5y agoThis 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.
- eklavya 5y agoWe 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 :)
- twic 5y ago> 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.
- wing-_-nuts 5y agoGo'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.
- bpodgursky 5y agoNobody 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.
- yongjik 5y agoYou 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.)
- baby 5y agoI just got some flashback reading that long string, and my heartbeat raised. The namespacing system is also a nightmare Com.prout.shit.lol...
- koolba 5y agoNamespacing 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.
- eurasiantiger 5y agoJust 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?
- for_xyz 5y agoTo 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.
- koolba 5y agoBut how else will your app automatically detect and inject its enterprise LangDetectLanguageIdentifierConfligurator at startup?
- dmingod666 5y agoor as the saying goes, "you can write java in any language".
- eurasiantiger 5y agoMaking JavaScript turn into Java bytecode is not a magical experience.
- eitland 5y agoOr 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.
- coldtea 5y ago>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...
- vips7L 5y agoI honestly don't know how anyone could think Go is less verbose than Java. Manual for loops? No generics?