5 ms·
> I don't know how you can find even average Java code unreadable. If anything it's incredibly verbose. Not bad_user, obviously, but excessive verbosity can be
by lomnakkus 11y ago
> I don't know how you can find even average Java code unreadable. If anything it's incredibly verbose.
Not bad_user, obviously, but excessive verbosity can be antithetical to readability. (As can excessive conciseness.)
It can make the overall structure and meaning of the code hard to discern, even though can clearly tell where what gets assigned to what variables, etc.
- jdmichal 11y agoCompletely agree. This is really the best time for comments in Java. Have 5 lines of stuff that's essentially working towards a single goal? Comment it! You should end up with the comments reading out the narrative properly, even if the code is way too wordy.
- rcurry 11y agoThe thing that always kills me on new Java projects is wading through these enormous hierarchies of folders full of interface classes just to find one actual line of implementation code. Of course, right after that one line of implementation code there's an invocation of some other interface class that then leads me on the next goose chase to find line 2. I think it's not so much a problem of verbosity as it is this sort of "Enterprise FizzBuzz" mentality that crept into Java over the years. Some of this IOC stuff gets so far out of hand that I feel like I'm in the House of Mirrors at the local carnival when I first start trying to walk through a new code base.
- pjmlp 11y agoHence why IDEs with their code navigation tools rule.
- mercurial 11y agoYeah, I don't know. Java developers need IDEs like Rob Ford needs crack cocaine, but it's more a comment on the deficiencies of the language than the purported benefits of an IDE.
- pjmlp 11y agoIDEs were created for Interlisp-D, Smalltalk and Mesa/Cedar. Were popularized in the PC, Amiga and NeXT eco-systems, thanks to Turbo Pascal, Delphi, VB, AMOS, GFA, Objective-C, Eiffel, Oberon, ... Java wasn't even a thing in those days.
- mercurial 11y agoThat's not the point. Due to its verbosity, it's impractical to use Java without an IDE. That's not necessarily the case for more compact languages.
- pjmlp 11y agoPrograms are written once, read multiple times.
- bad_user 11y agoWould be curious to find out what that means, since I see it repeated many times in favor of mainstream and verbose languages, such as Java. I get it to mean somehow that Java is more readable, however in my experience that doesn't make sense, as the IDE can deal with generating the boilerplate, but the IDE cannot help with readability. Not even if you include quick navigation by click, since that has been the purpose of ctags in plain editors.
- mercurial 11y agoEclipse folds the import section, and you can get the type of a value by hovering over it, but apart from that, I'm not sure.
- pjmlp 11y agoIt means that anyone strange to the code is able to pick a pile of printouts and have a ruff understanding of the code. Which is very hard in languages that are a pile of hieroglyphics. This is very important in teams of 50+ developers, scattered around countries with high attrition rate, having various skill levels. Also generating boilerplate is just 1% of what an IDE is capable of.
- Too 11y agoThe verbosity not just directly affects readability by simply being longer and more to read. It also affects writeability which in combination with lazy developers (as we all are) leads to bad, unreadable, code. This is true for any language and can most often be seen on sloppy error handling, if you have to write 2x the amount of code to handle errors will you do it? 10x?
- stickfigure 11y agoOdd that this is showing up as a jab against Java and not, say, Go.
- bad_user 11y agoOh, it is very much relevant for Go, except that those of us interested in expressivity simply gave up on Go a long time ago. You see, Go is not popular enough to have users that don't like it. The people that end up trying out Go simply move to something else if they don't like it. Go's community is also strongly opinionated and has rejected any dialog for meaningful improvements. In other words the Go community is filtering out people that want something different. Whether this is good or bad, you be the judge, but if there's one thing that's definitely bad is the echo chamber. Case in point you're under the impression that Go is tolerable, even though many of us consider it to be worse than Java.
- stickfigure 11y agoYou misunderstand me. I find Go painfully verbose, mostly because of the elaborate if/else constructs around every single method call to handle errors. Even Java's ill-conceived checked exceptions (which can be suppressed with lombok's @SneakyThrows) are a massive improvement.