Live data from Hacker News

Java 7 is now available

oracle.com

171–180 of 218 posts

Re: Java 7 is now available

#171

Earlier quoted context omitted.

I know why he gets downvoted: There's a lot of kids on hacker news that only use ruby and/or javascript and they really don't want to hear about them being bad at something. hell they wrote a WEB APPLICATION. Now ain't that something.

That's just foolish. I write Java daily for a very large web company, and I downvoted him. Because his claim is nonsensical. I downvoted you too, because your claim is trollish and wrong. I have been writing Java since I was 13. I am 23 now. I have been paid for code written in C#, Java, JavaScript, PHP, F#, and Python. My personal projects are written in Scala, C#, C++, and JavaScript. I emphatically do not use Ruby…

As it is, I have an unhealthy number of vim macros to deal with all the boilerplate that Java foists upon a developer.

I hate to bring up the editor wars thang, but knowing a lot of very skilled people in the Java world, I will say this: it's rare for a "best in class" Java developer to use anything but a full fledged Java IDE (not unheard of, but rare). If you're not using one of these (IntelliJ, Eclipse, or Netbeans, in my personal order of preference), you're really missing out on almost everything good that Java has to offer over other languages, as far as boilerplate-simplifying, integration, and bug-hunting. IMO, unless you're using a good Java IDE and have used it long enough to know it well, you are not actually coding Java, you're coding some shitty worst-of-all-worlds version of Java, and it's no surprise that you hate it. I don't know how I could possibly code Java and remain sane without the ten-times-a-minute ctrl-space auto-complete/lookup routine (along with all the other time saving macros and shortcuts that a good IDE will give you)...

FWIW, I say this as a die-hard emacs user (bite me, vim :) ) that uses it for damn near every "I have to edit some text" task that he comes across, so this is not an issue of me not understanding what a good text editor is capable of. Ruby, JS, PHP, Clojure, Python, and the like are in emacs territory for me, but when it comes to Java, the tools really do counteract many of the language's failures (and let's be honest, the number one offender is the lack of closures, with the annoyingly explicit static typing coming a close second), and I'll be honest, I miss the IDE features when I code dynamic languages - it sucks to have to resort to textual searches instead of actually walking the parse tree, even if it can get you 80% of the way there most of the time.

Honestly, I've always personally thought that AS3 had a lot of potential, as a mostly-statically-typed-but-dynamic-if-you-need-it version of Javascript, but even there the IDEs aren't quite up to the Java standard (mostly due to apathy, as far as I can tell, there's nothing about the language that would make any of the features common to Java IDEs any more difficult to implement in AS3 ones), so the benefits of the default static typing are somewhat muted...

Re: Java 7 is now available

#172

Earlier quoted context omitted.

You are basically saying that people cannot write good code in Java. You are generalizing and that makes you sound like and troll even though I know that is not your intention. You can write good or bad code in Java. I personally have never really had an issue with Java so I don't really understand the hate. Yes, there are sucky frameworks out there but you do know that you don't have to use them? Either I'm writing…

You know, I was thinking the same about Java. That's when I posted this question. http://news.ycombinator.com/item?id=2094274 ; It got front page, and one (that's 1) pointer to good Java code. For whatever reason, whether it is merit or culture, Java programmers tend to write horrible code. I'm sure there's some nice Java code out there, that is not 20 times longer than it should be. But I have not yet seen evidence,…

FYI - several more examples of good Java code (concurrency): http://code.google.com/p/disruptor/ http://code.google.com/p/jetlang/ http://code.google.com/p/actorom/

Re: Java 7 is now available

#173

Earlier quoted context omitted.

Java does no such thing as "encourages 20,000 line behemoths filled with dross". Bad programmers do. If you're creating several methods that only differ a little bit, you're doing something stupid. In any language. Bad programmers create bad code. The language is totally irrelevant.

It's really not irrelevant. There's a reason that people aren't programming in COBOL or BASIC.

Yes, the reason is the runtimes for them suck, or aren't needed.

If there was a decent runtime for BASIC or COBOL, which gave real world advantages over everything else, I'd switch to BASIC or COBOL in a heart beat.

I'm a programmer. The language I use is pretty irrelevant. If It starts looking ugly, I'd just write a cross compiler. This is not rocket science.

Re: Java 7 is now available

#174

Earlier quoted context omitted.

they had that, it is called silverlight. People didn't want it all that much.

Silverlight is still limited to Windows and Mac. Moonlight is from a third party and doesn't count toward Microsoft's community altruism score.

> Silverlight is still limited to Windows and Mac

And as a direct consequence of Silverlight not being all that popular, that will not change. Sadly.

Re: Java 7 is now available

#177

Earlier quoted context omitted.

"Agree to disagree" is a polite way of saying "you're wrong." Are you incapable of substantiating your position?

Yes, you are right. I'm politely telling you that I respect your opinion but I disagree. >>Are you incapable of substantiating your position? The thing is that a lot of the arguments we are making are just our own opinions and hence anecdotal. Really what we need here is scientific research measuring what difference does the programming language make when working on coding projects A couple of examples that I've work…

Upvoted for "coding takes very little time" ! Most often, you are making 100s of small but significant decisions of algorithms, runtimes, libraries, memory footprints etc that the actual coding part ends up being the less significant aspect.

Also, I really admire the polite but confident way you responded to eropple's borderline trolling. Good show !

Re: Java 7 is now available

#179
post #72

There is a good amount of stuff to get excited about in this release. - Try-with-resources-Catch-Block [0] - Fork/Join libraries from Doug Lea (author of Executor framework) [1] - Inferred/Simpler generics in declarations (should have been in Java 5) - NIO2, brand new/robust filesystem APIs [2] - NIO2, treat ZIP/JAR files like directories of files for R/W [3] - SDP support [4] - String-in-switch (NOTE: check on perfo…

For version 8, I think it is a stretch to say that it will support 'closures'. [0] The closures that are proposed are more like a bolted on psuedo solution, basically syntactic sugar that makes the language more complex. You can only use them in SAM (Single Abstract Method) situations. If only they just added a simple lisp like lambda expression... [0] http://cr.openjdk.java.net/~briangoetz/lambda/lambda-state-3...

I fail to see how the lambdas, when added, will make the language more complex. Here's an example: given a list of persons, we'd like to extract all the adults. Compare the good ol' way of doing things in Java:

List persons = Humans.list(); List adults = new ArrayList(); for(Person p: persons) { if(p.age>=18){ adults.add(p); } }

Notice how the logic (filtering a list) gets drowned in irrelevant details such as creating the result list, iterating over the list, and accumulating the matching elements.

The alternative (the poor man's functional Java) with libs like Google collections would look like:

List adults = persons.filter(new Filter() {

@Override public boolean accept(Person t) { return t.age>=18; } });

Notice the noise added by the anonymous inner class.

Now, with lambdas, we end up with (once the collections are augmented methods like filter, map, reduce, etc.):

List adults = persons.filter(#{p -> p.age >= 18});

A one-liner, where the core logic (comparing the age to 18) clearly stands out.

The auto conversions of lambdas to SAM types is a spark of genius if you ask me. But I'm not happy with the decision of not implementing structural types in Java. IMO, this will lead to a Cambrian explosion in the number of SAM types, types like Mapper, Reducer, Folder, Filter or Predicate, plus the custom types added by various frameworks.

Re: Java 7 is now available

#180

Earlier quoted context omitted.

Well, people want different things. I just want the hammer. New language features are all fun, but unless they actually result in faster execution, or allow you to do things you could not do before, they're only use is to make some developers happy, which I don't think is particularly important. It looks like there's some real solid good APIs here though which is great to see. At first thought I imagined it'd just be…

Come on, let's get honest. The ecosystem matters. A lot. The community, and level of interest and delight in using the language matters.. Yes, even to you. It determines what third party tools are available, how easy it is to hire developers, and what machines the platform actually runs on. Your argument suggests you'd be just as happy and productive developing today in Pascal. "You can now do closures or first class…

> and a bigger problem is that more than any other language I'm familiar with Java suffers from the problem of not being able to see enough ideas in a given amount of source code.

This is not an issue with Java. It's an issue with the programmer. How are you going to cope with assembly language listings? Blame assembly language?

Post reply on HN