Live data from Hacker News

Java 7 is now available

oracle.com

111–120 of 218 posts

Re: Java 7 is now available

#111

Earlier quoted context omitted.

I don't think this is a valid analogy. The language/tools/support/ability-to-hire-developers are all a fluid ever-changing thing. Hammers aren't. Take this post.. people are excited about updates . I'm just saying the updates are kind of too little too late for me.

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…

At first thought I imagined it'd just be useless pandering to developers like "You can now do closures or first class functions" or something equally useless.

Congratulations, you've found your Blub. (Mine is Python; I'm still not clear on what monads would do for me in practice).

Re: Java 7 is now available

#112
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…

One other great feature in JDK8 will be defender methods which will allow interfaces to carry default behavior for methods. This will be the mechanism for adding default behavior in the collection libraries without breaking classes that extend them. It will also have a lot of great use cases in new library development.

I wasn't even aware of that proposal, just found these examples[1] and love the idea.

Sort of in the same vein as static imports (as far as usability) but has a really nice added side effect of exporting a default impl from an interface that can be overridden.

Thanks!

[1] http://www.baptiste-wicht.com/2010/05/java-7-add-public-defe...

Re: Java 7 is now available

#113
post #55

Earlier quoted context omitted.

I don't know if I agree. The Java language has floundered (I've been stuck coding in it for the last couple of years), but I think the platform/JVM has started becoming used more and more often for new + exciting language options. The new release should make implementing dynamic languages on top of the JVM easiser, and could open the doors for a lot of interesting options.

I don't think I would say it's floundered. I came back to Java last year after 10 years of C++, and was really pleasantly surprised: Programming in Java now is a nice experience. I would say it has matured, not floundered.

You must be coming from a different C++ background. I had to program in Java for a couple years after 10 years of C++/Qt and was unpleasantly surprised. Java manages to be slower and more verbose/less powerful than C++.

Re: Java 7 is now available

#114
post #33

Earlier quoted context omitted.

Probably not. See what Rich Hickey said about this: http://clojure-log.n01se.net/date/2008-09-03.html#09:13a

I'm a little disappointed that people are still talking about tagged ints. There are so many better ways to avoid the overheap of integers being a refrence type (namely type specializing everything under the sun, particularly your JIT'd code and data structures).

Could you please tell me something more about it? Tagged unboxed data seems to be a nice solution for me.

Re: Java 7 is now available

#115
post #114

Earlier quoted context omitted.

I'm a little disappointed that people are still talking about tagged ints. There are so many better ways to avoid the overheap of integers being a refrence type (namely type specializing everything under the sun, particularly your JIT'd code and data structures).

Could you please tell me something more about it? Tagged unboxed data seems to be a nice solution for me.

Well, the problem with it is it has a negative performance impact on everything else in your codebase, the first time you see any pointer you need to check if it's tagged or not. The advantages are clear: you don't need to allocate anything on the heap for integers. Which means you're sacrificing performance on everything else, for integers. Solutions such as automatic type-specializing containers don't carry this downside, and carry the same upside. For example at the moment PyPy type-specializes dictionaries. Python has a single `dict` type, which can store anything, but we type specialize and fallback if we get it wrong. Similarly, we're working on type-specializng lists, tuples, and user objects. If there's anything more I can answer let me know.

Re: Java 7 is now available

#116

Earlier quoted context omitted.

> Those are the kind of features that are sorely lacking in Java, and that means huge, bloated code bases. No, it doesn't. If you can't write concise Java, you're doing something wrong. And if you can't read code well, go practice some more. Disclaimer: I'm an outlier. I rarely use 3rd party libs, rarely write with anyone else, etc.

@felipemnoa: Downvotes are presumably for snarky 'You must suck and reading/writing code then' comments. Isn't a positive contribution to the discussion. Also, 'making the difference' and 'being totally irrelevant' are two very different things. Programming languages matter. I'd be surprised if Mr. Spolsky disagrees.

I think it is. If people haven't learnt yet that the single most important skill you need as a programmer is being able to read any code, in any language, and take a good guess at what it does, be able to hold abstract programming concepts in your head, and match them up to random code listings you have never seen before....

Before you can write code, you need to know how to read it.

Re: Java 7 is now available

#118

Earlier quoted context omitted.

> Those are the kind of features that are sorely lacking in Java, and that means huge, bloated code bases. No, it doesn't. If you can't write concise Java, you're doing something wrong. And if you can't read code well, go practice some more. Disclaimer: I'm an outlier. I rarely use 3rd party libs, rarely write with anyone else, etc.

>>No, it doesn't. If you can't write concise Java, you're doing something wrong. And if you can't read code well, go practice some more. Don't know why you are getting down voted. Even Joel Spolsky says that what really makes the difference is the programmer, not the language. If you suck in Java you will probably suck in other languages.

Then why did he wrote his own language for his product? Oh right, because languages do matter.

Sure, what makes one a great programmer is language independent, but that doesn't mean you can have the same code quality in every language. There's a reason why professionals in every field buy top quality tools and not cheap disposable crap.

Re: Java 7 is now available

#119
post #107

Earlier quoted context omitted.

No love for JSR 310?

Ahh, good point. I'll add that to Java 8 hotness list. Thank you. UPDATE: Couldn't add it to the original post (edit has expired), here is more info about Joda Time for Java 8[1] for folks that are interested. [1] http://www.jroller.com/scolebourne/entry/what_about_jsr_310

> here is more info about Joda Time for Java 8

JSR 310 is not Joda for Java 8 (or 7). It's by Joda's author and uses a very similar API, but it's a cleanroom implementation and not compatible with Joda: over time, Stephen Colebourne (Joda lead dev) found core issues in Joda, and JSR-310 is the occasion to use the lessons learned from Joda.

Re: Java 7 is now available

#120

Earlier quoted context omitted.

> Those are the kind of features that are sorely lacking in Java, and that means huge, bloated code bases. No, it doesn't. If you can't write concise Java, you're doing something wrong. And if you can't read code well, go practice some more. Disclaimer: I'm an outlier. I rarely use 3rd party libs, rarely write with anyone else, etc.

>>No, it doesn't. If you can't write concise Java, you're doing something wrong. And if you can't read code well, go practice some more. Don't know why you are getting down voted. Even Joel Spolsky says that what really makes the difference is the programmer, not the language. If you suck in Java you will probably suck in other languages.

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.
Post reply on HN