4 ms·
Folks who still think that Java is a bad language either from the perspective of developer ergonomics or performance probably haven't programmed in it since the
by avl999 6y ago
Folks who still think that Java is a bad language either from the perspective of developer ergonomics or performance probably haven't programmed in it since the Java 4 days and still think of the language as the language of Enterprise Java Beans, Java Applets and hundreds of lines of XML. It is not that language anymore. Modern Java is blisteringly fast(and has been for a while) and almost the same level as C# in terms of developers ergonomics
- sangnoir 6y agoI haven't programmed in Java since around 6 - when Spring was just about to cement its dominance. The ergonomics then were bad too. It seems lots of quality-of-life features borrowed from other languages went into subsequent versions
- ravi-delia 6y agoAdmittedly, Java suffers from the same issue as C#; those ergonomics come from a bad case of kitchen-sink-itis. In your own code it's fine, but it's a hassle going through 8 different paradigms in one legacy codebase.
- hn_throwaway_99 6y agoThese days, though, I feel like Java the language should die in favor of Kotlin (also invented by Jetbrains). I feel like with Kotlin you get all of the goodness of Java (and especially the JVM) without so much of the verbose "cruftiness" that is a result of Java the language being 25 years old (wow now I feel old!)
- pie_flavor 6y agoModern Java has nowhere near the developer ergonomics of C#, I can tell you that much. You are still manually writing tons of boilerplate, you still cannot express something as simple as List<int> (and the JSR for that is on its, what, 8th iteration? for a problem that existed since before C# existed?), there is no async/await in 2020 when even C++ has figured it out, the new module management system is a joke that solves zero problems and almost seems like it was only invented to modularize the JRE... It's got a few bells and whistles, although I can't think of a single one that wasn't stolen syntax and all from C# at least two years after the fact, except for the aforementioned modules. But 'var' is the only thing I can think of that's actually improved the Java experience since lambdas. They've committed to a six month rolling release cycle without actually having anything to put in the releases. That said, Java devs think C# is slow, C# devs think Java is slow, and people who are neither think both are slow. It is no longer 1995 where bytecode is interpreted; the slowdown relative to C++ is 2.5x-3x for both. Any leftover 'slow' opinions are bordering on superstition at this point.
- jolux 6y agoI’m a huge fan of C# and how Microsoft has been improving .NET recently but as a C# fan I think you’re being a little unfair to Java. It has a slightly different perspective on language evolution than C#, in that they try to keep the language core smaller. I was overwhelmed by syntax when I first started programming C#, from all the different kinds of parameters (optional, named, ref, out, in) to all the different kinds of properties, to the actual difference between properties and fields. To this day I think it’s silly that certain tools and style guides will suggest you replace public fields with public auto-properties, when there is no difference in encapsulation in practice. In this sense C# is closer to the culture of C++, where the bar for adding features is quite low. Java just moves a lot slower, and has a different philosophy for adding features, and the core team seems averse to introducing new forms. An example I ran into the other day is applying first-class functions in Java: in C#, this looks like lambda(arg1, arg2) while in Java it’s lambda.apply(arg1, arg2) This is definitely more verbose and arguably uglier, but it hews closer to the object-oriented style because it’s visibly falling a method on an object. Of course this is happening in C# as well, but it’s hidden by syntactic sugar.
- to11mtm 6y ago> This is definitely more verbose and arguably uglier, but it hews closer to the object-oriented style because it’s visibly falling a method on an object. Of course this is happening in C# as well, but it’s hidden by syntactic sugar. It's hard to appreciate how addictive the sugar is if you never had it. Frankly, language level auto properties -alone- would get rid of 25-33% of the pain I feel writing Java. Of course, there is always Scala on the JVM Side; which gives you all sorts of sugar, but in some ways -too much-.
- jolux 6y agoI think from an object-oriented design perspective that it's quite easy to overuse public field members and that a lot of getters and setters is generally a code smell. Nonetheless, properties are a very sharp tool and having them in the toolkit is wonderful. I've never used Scala but it seems to go much further in the syntactic sugar and semantic complexity direction, more akin to F# than C# (though with less elegant syntax, to my eye).