Live data from Hacker News

Java Is Underhyped

jackson.sh

571–580 of 808 posts

Re: Java Is Underhyped

#571
post #564
post #494

Earlier quoted context omitted.

Sorry, you're right. I was thinking about "instanceof" which is a native JS feature, and it matches classes nominally.

Got you. I was a little disappointed that TS only had structural type checking, but then it's still better than nothing.

To be honest it makes sense for it. It means if something (a library, browser API etc.) has no type, you can write an interface for it and hint for it, without depending on anything else.

You can think about the structural type as a hash check on a type. If the hash matches, chances are it's the type you want. Collisions are possible, but highly unlikely, hence why in practice it works great (and we still have instanceof and tagged types).

Re: Java Is Underhyped

#572
post #482

Earlier quoted context omitted.

> there's almost always some JS expertise built into the organization. That is usually part of the front-end team that don't do the backend SQL work. Tho team that would get assigned the work for a backend greenfield would be versed in Java.

It’s surprisingly rare for things to split like that. At most companies people will be more skilled at front end or back end work, but it’s rarely a clean separation with front end vs back end teams. That’s an outgrowth of most projects being quite small. Paying a team or 20+ people to work on one thing is freaking expensive to the point where it needs major benefit or huge company to be worth it. On the other hand m…

Those are pretty strong assertions with no statistics to back them up. It doesn’t reflect the ecosystem I work in.

I think you underestimate the number of huge companies that see major benefit from large teams working large development efforts.

Re: Java Is Underhyped

#573
post #112

> Java is fun to write, productive What the hell? I don't think we have the same definition for any of these words. I know Java has changed quite a bit since Java 8 (Java 9 being the last version I used professionally before switching completely to Go), but I just can't write Java again, it's physical. When I want to try a new Java feature and think about writing the scaffolding code, my stomach actually hurts. Not t…

You actually went to Go and say that java is painful to write? Wth?

Re: Java Is Underhyped

#574
post #381

This post from "an ignorant computer science undergrad" is pretty silly, so allow me to get a little silly in response. I think if Java's new features are an attempt to woo new developers, Java comes off pretty tragically, like the old guy in the club, trying stay relevant by showing off how it just got up to date with ideas that hit the mainstream ten years ago. Whoa, check out these record classes! Fresh stuff over…

Java development scales, it has pretty good performance, and great tooling. I agree that it's underhyped. You can pick a lot of other languages, but no other language is as broad as Java. Python reads like a dream but has useless perf and threading. Javascript (Node et al) has the I/O concurrency but no clear solution to threading, and is bad at number crunching. C++ has good perf but is overly complicated, compiles…

> Java development scales, it has pretty good performance, and great tooling.

I agree with this, but I think these qualities are shared by a lot of languages that run on the JVM, and Java the language is no longer a worthy flagship language for the JVM.

> With lambdas and streams, even FP is succinct in it.

I have the opposite reaction to lambdas and streams. I think Oracle could have gone two ways with the evolution of Java:

- Be conservative about what features were adopted into Java, but be willing to change the syntax and feel of the language to do it in the best possible way. Only add features that both made sense for Java and had proven themselves after years of experience with the languages that pioneered them, but give Java the most elegant and polished version of them, so that Java would be a kind of "best in class" language that trailed the leading edge but always reflected it in an excellent way -- at any moment, the best version of Java that could be built with the industry's combined experience.

- Or, keep Java feeling as familiar as possible, while adding any features that are embarrassing to lack. It's okay if new features feel bolted on or don't feel as elegant as they do in newer languages; it's more important that longtime Java programmers don't feel like the fundamentals of the language are changing underneath them.

Streams are what convinced me that Oracle were committed to the latter route. They came out with an implementation that looked and felt clunky compared to what people were used to in other languages, but it felt very Java-y, and existing Java developers were pretty immediately comfortable with it.

Re: Java Is Underhyped

#575

Earlier quoted context omitted.

> Java's type system is so weak that it doesn't even prevent null from inhabiting almost every type. "So weak"? You do realize that this is basically where every language was less than a decade ago?

I like Java, but that's weak argument. We're in 2021, not decade ago.

What language sees wide spread use without at least a decade in gestation? Java, ironically, but cutting edge languages take longer than a decade before making it to the blue collar programmer's floor. I mean the number of people that struggle with even stuff like generics still is amazing and that has been around for 17 years at this point so 10 years is nothing.

Re: Java Is Underhyped

#576
Norwegian is underhyped; performs way better than Swedish. Stop quibbering over programming languages already and just build well-tested, robust software.

Re: Java Is Underhyped

#577

I think the author just hasn't seen enough. There's not a single language that's better than every other language at everything. Java's type system is inferior to ML language's type system. Java's developer experience is laughable compared to Common Lisp's interactive development. A lot of languages have great package managers - Rust and Elixir comes to mind. Also sometimes smaller community with higher quality is be…

The fact that somebody had to point out to him that C# also met his four points under "A holy grail of productivity" should tell you all you need to know about his complete lack of experience in the field.

This is nothing more than the ramblings of an inexperienced kid who thinks they know it all. He'll probably look back on this in a few years and realize how little he actually knew.

Re: Java Is Underhyped

#578

I've never heard someone with experience in npm say they love maven. Interesting. Regardless, I actually agree Java is a fine language. I'm still surprisingly productive in it despite 10 years of time away. However, it's the culture around Java that I hate, and that's the reason I avoid Java. The amount of low quality Java code out there is staggering. The culture around Java is one of extreme levels of abstraction a…

There are as many Java developers as people in a smaller country. FizzBuzzEnterprise is just a big subset of them, but there are so so many other interesting niches, like robotics, hell real time usage, everything.

Re: Java Is Underhyped

#579

Earlier quoted context omitted.

Java is so much worse on this front. > with Java, you just dump the necessary jars into a directory, include them in the classpath, and it works. Ant, maven, or gradle, and then some jars, somewhere? What's the classpath and whats $JAVA_HOME for this project? Oh and now I have to make it work in the IDE too, click through a billion menus and dialogs, sync the build system, sync the dependencies, configure runtimes an…

I have done 10+ years of Java development and 1 year of Python. And I disagree, Java packaging is better. You can package all your dependencies in a fat jar like Spring boot does and you only need to run it with java -jar lib.jar and you are good to go. Dependency management is a mess in the Python world and my number 1 complaint. You have pip, pipenv, poetry, anaconda, to manage your 3rd parties. And if you want to…

Great, but you will actually want to write some code, so you have to do this insane IDE setup clickfest.

I am not saying Python's packaging is any good, it sucks. But you can't realistically ignore Java's IDE shitshow.

Re: Java Is Underhyped

#580
post #256

Earlier quoted context omitted.

> pervasive use of `null` and `Object` Who is pervasively using Object? You are talking about a language that hasn't existed for a decade.

As a simple example, `x.equals(y)` accepts an arbitrary Object y. This one example has ramifications all over the place, e.g. I had a bug recently where I was checking if an element was in a collection, using `x.contains(y)`. That .contains method seems to use .equals, since it allows y to be any Object. In my case x was a collection of MyType values whilst y was a MyWrapper which I forgot to unwrap. Rather than givi…

Alt insert generate equals method, select fields, ready. Or use a record. It is such a minuscule part of the language, that it simply doesn’t matter compared to every other line of code, lib, ecosystem. You may imagine how much more productive you are that this language has sane equals, but it is not even a reasonable constant factor.
Post reply on HN