Live data from Hacker News

Why Java Now Rocks More Than Ever: Part 1 – The Java Compiler

zeroturnaround.com

131–140 of 149 posts

Re: Why Java Now Rocks More Than Ever: Part 1 – The Java Compiler

#131

I don't know if the whole oracle/sun debacle is to blame for the complete stagnation of the jvm and the java language, but the development pace is laughable these days. We're still waiting for proper lambda expressions after all these years. We still have a runtime without generics. And so on. The irony of the article is that ZeroTurnaround not only make money from the java community, but does so by selling tools tha…

I never understood what's the big deal about runtime generics. It's clear that some minority of people thinks that it's so important that it's almost the sole reason why "java sucks", but it's just a tradeoff that's decision that is controversial at best, with lots of people being completely happy about that. For lambdas, I agreed though. Also, basic type inference, at least in a form already provided by project Lomb…

The type erasure is just a bad match with what's essentially a quite weak type system withq few other design flaws in it. Had the type system been good otherwise, it wouldn't have been that bad, but the way java works with for example array covariance and so on makes it a poor design.

That, and of course the fact that all AnyCollectionType should work with primitive types without performance penalties. Having to use an MyFancyIntTree rather than MyFancyTeee is a bloody disgrace.

Re: Why Java Now Rocks More Than Ever: Part 1 – The Java Compiler

#132

Earlier quoted context omitted.

- No pattern matching. This alone basically makes the rest of this list just piling on; once you have 'gotten' pattern matching, Java (and, to be fair, most other popular languages) becomes intolerable. - Lack of even halfassedly reified generics means you're throwing Class objects around everywhere for no good reason. (Scala adds manifests as implicit parameters and it's not as good as .NET but it's a hell of a lot…

- Type erasure - true but it results in a very small increase in overall verbosity. - Null - true but Scala's approach is perhaps more verbose than Java's. I like Groovy's approach the most (). - Functional if - definitely disagree that it makes tons of code simpler / easier to read. - Java 8 has traits (but I'm not sure if they're equivalent to Scala's traits). - Nonfunctional core API's – Guava helps here. – Refere…

[deleted]

Re: Why Java Now Rocks More Than Ever: Part 1 – The Java Compiler

#133

Earlier quoted context omitted.

- Type erasure - true but it results in a very small increase in overall verbosity. - Null - true but Scala's approach is perhaps more verbose than Java's. I like Groovy's approach the most (). - Functional if - definitely disagree that it makes tons of code simpler / easier to read. - Java 8 has traits (but I'm not sure if they're equivalent to Scala's traits). - Nonfunctional core API's – Guava helps here. – Refere…

Yammer did no such thing (and it's telling that you're sourcing a two-year-old article that misrepresents the situation under discussion): http://eng.yammer.com/scala-at-yammer/ And Scala isn't the next Java. Frankly, it isn't simple enough to appeal to people who have become comfortable ; it isn't unchallenging enough to supplant Java. This is not a demerit.

Right now at Yammer we're moving our basic infrastructure stack over to Java, and keeping Scala support around in the form of façades and legacy libraries.

The link you provided doesn't contradict that.

Language can be too simple or too complex. The tradeoff that gives maximum productivity is somewhere in the middle. And in my opinion, languages like Dart or Ceylon are much closer to the optimum than Scala.

Re: Why Java Now Rocks More Than Ever: Part 1 – The Java Compiler

#134
post #64

One of the things I see with Java today, how difficult things have gotten with the language. Its next impossible to deal with any large Java project without an IDE. The verbosity of the code is mind boggling. Often method calls are 4 - 6 layers deep, which in itself makes is very difficult to remember or even implement even if you read the documentation well. The resulting code is massive walls of text. 90% of that i…

It's impossible to deal with ANY LARGE PROJECT without an IDE. If you don't use an IDE, your project is not large yet.

I would say that if you need an IDE because of the size of your project, the components are too tightly coupled.

(Admittedly, I like what IDEs can do in static languages to catch errors early and improve productivity, but that's independent of project scale.)

Re: Why Java Now Rocks More Than Ever: Part 1 – The Java Compiler

#135

Earlier quoted context omitted.

Yammer did no such thing (and it's telling that you're sourcing a two-year-old article that misrepresents the situation under discussion): http://eng.yammer.com/scala-at-yammer/ And Scala isn't the next Java. Frankly, it isn't simple enough to appeal to people who have become comfortable ; it isn't unchallenging enough to supplant Java. This is not a demerit.

Right now at Yammer we're moving our basic infrastructure stack over to Java, and keeping Scala support around in the form of façades and legacy libraries. The link you provided doesn't contradict that. Language can be too simple or too complex. The tradeoff that gives maximum productivity is somewhere in the middle. And in my opinion, languages like Dart or Ceylon are much closer to the optimum than Scala.

I don't think you've done anything to substantiate the claim that it's "too complex"; forgive my skepticism but I've spent enough time in both the Scala and C++ communities to draw a significant line between "too complex" and "critic hasn't learned it sufficiently" (and I've been on both sides of that line).

I have spent a nontrivial amount of time with Kotlin and Ceylon and neither are particularly interesting to me after actually internalizing and understanding Scala; as an example, I am significantly hampered by their continued insistence on mutable-everywhere (which is basically the watchword for "barely adequate programmer"). They may very well be "the next Java", but that's a curse more than a compliment. You should not need Guava to write minimally competent code.

Meanwhile, as a sibling comment notes, Twitter's a lot bigger than Yammer and pretty vocal about going whole-hog on Scala (and I've talked to them a little about what they've done, it's insanely impressive, I'm jealous). Guess they're just making things hard on themselves for no reason though.

Re: Why Java Now Rocks More Than Ever: Part 1 – The Java Compiler

#136
The author forgot to state in his title that he compares Java to C/C++/Objective-C languages (he does state it in the comments though).

In this context the article is a joke. Java Rock More Than Ever, my ass! The author compares one old technology to the other old technology using a 10 year old list of features.

Re: Why Java Now Rocks More Than Ever: Part 1 – The Java Compiler

#137

Earlier quoted context omitted.

As someone suggested earlier, Scala is probably the best option for a Java developer looking for an alternative. Runs in the JVM, is compatible with Java programs, mixes OOP and functional programming. It can be summarized as "Java meets Haskell". What I found liberating in Scala is a simple proposition: "use OOP when it makes sense, and functional programming when it makes sense". It's wonderful when you don't have…

> Your criticism to Scala in the other comment seems to amount to "it's not Java" It amounts to "Scala is too complex, ugly and slow to compile." Yammer moved from Scala to Java BTW: http://blog.joda.org/2011/11/real-life-scala-feedback-from-y... My ideal language would be some mix of Kotlin, Ceylon, Dart and Julia.

You are just taking one data point and assuming it proves something other than Yammer had problems with Scala. Check this list of companies using Scala: http://www.scala-lang.org/old/node/1658.html

Some examples: Twitter, LinkedIn, Foursquare. All of them pretty big and in the same space of Yammer; they seem quite happy and don't plan to move away from Scala.

And here you can find a clarification from Yammer about that issue: http://eng.yammer.com/scala-at-yammer/

TL;DR: They liked Scala but it has rough edges, every programming language has rough edges (yes, including Java). They found Scala was not the best option for some particular situations and Java was a better fit. End of story.

That's fine and completely reasonable, I think nobody said Scala is the Holy Grail in programming languages. As for your preference, you seem to be looking for a "nicer than Java, but OOP all the way" (don't know about Julia, haven't used it), which is OK as a preference but many of us find it a kludge to work with. I found something like Scala (multi-paradigm, I mean) helps me a lot in reasoning about code. As I said, you use the paradigm that makes more sense.

For complexity and ugliness, you have my previous answer. About compile time, you have a sophisticated type system and type inference which come at a cost, but it's not such a big deal when you run it with fsc (which stands for fast scala compiler).

Re: Why Java Now Rocks More Than Ever: Part 1 – The Java Compiler

#138
post #64

One of the things I see with Java today, how difficult things have gotten with the language. Its next impossible to deal with any large Java project without an IDE. The verbosity of the code is mind boggling. Often method calls are 4 - 6 layers deep, which in itself makes is very difficult to remember or even implement even if you read the documentation well. The resulting code is massive walls of text. 90% of that i…

It's impossible to deal with ANY LARGE PROJECT without an IDE. If you don't use an IDE, your project is not large yet.

Would you call the Linux kernel a large project?

Re: Why Java Now Rocks More Than Ever: Part 1 – The Java Compiler

#139
post #88

Earlier quoted context omitted.

I like working with Java too. I'm only pointing out the problems, which I see are pretty clear. The only problem is from the perspective of using and developing a new skill, I would rather use a newer language which is better built for problems of our time than something 20 years back. Java has had its day in the sun. Its primary purpose was to become an easy C++ for people who didn't get memory management and people…

Each newer language has one common denominator - lack of proper IDE. Even though they come with some synctactic sugar, your productivity gets nailed by lack of good IDE. Java syntax has many problems, but they are very easy to overcome thanks to IDE and many JVM tools.

Scala tooling is quite ok now, particularly the IntelliJ IDEA plugin. Still not the level of Java, but certainly way above anything for (much older) dynamic languages.

Re: Why Java Now Rocks More Than Ever: Part 1 – The Java Compiler

#140
post #73

Earlier quoted context omitted.

> I really want type inference, lightweight objects, properties (vs JavaBean accessor convention), switch for 'instanceof', etc. I believe you're asking for Scala. For example, switching on types: trait Foo class Bar extends Foo class Baz extends Foo val thing = // could be either bar or baz, don't know thing match { case f: Foo => println("Got foo") case b: Bar => println("Got bar") }

:) Our study group has done two Scala tracks (and currently studying Akka and reactive programming). Ruby and Scala make my head hurt. I don't have a mental model for what's happening under the hood. Unlike LISP, Forth, Java, etc. I really do want a refined, simplified Java. My wishlist of features are gleened from Boo (minus the duck typing), Nice, and Kava (lightweight objects). http://boo.codehaus.org http://nice.…

Can you give an example of something in Ruby that makes your head hurt because you don't know what's going on under the hood?
Post reply on HN