SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Rob Spoor wrote:The ones I'll be looking forward to:
Strings in switch Statements- just because it's handy. The try-with-resources Statement - copied from C# ("using"), it makes it easier to make sure the resources are closed. Catching Multiple Exception Types and Rethrowing Exceptions with Improved Type Checking - especially the catching of multiple exception types can save some code; either the need to duplicate catch blocks disappears, or the need for instanceof checking disappears.
Pat Farrell wrote:I'm willing to bet that NIO.2 won't be useful to me. I spent many months on NIO (1) and it was simply too buggy and did not deliver significant performance improvements over boring Java IO. The new one won't be one of the first things I try.
Pat Farrell wrote:I'm not sure that the try-with-resources will actually be a net win. Time will tell.
Upgrade the components of the XML stack to the most recent stable versions: JAXP 1.4, JAXB 2.2a, and JAX-WS 2.2
Pat Farrell wrote:I am looking forward to an improved switch syntax, but I think it doesn't go far enough. I don't understand why switch can't work on anything that can be evaluated to a "equals" comparison.
I'm not sure that the try-with-resources will actually be a net win. Time will tell.
Stephan van Hulst wrote:
Pat Farrell wrote:I am looking forward to an improved switch syntax, but I think it doesn't go far enough. I don't understand why switch can't work on anything that can be evaluated to a "equals" comparison.
Probably because the cases need to be compile time constants. The compiler needs to be able to figure out you're not using duplicate cases.
Mike Simmons wrote:Well, I'm not sure they need to do it that way, but they choose to. I think it would be entirely possible to allow arbitrary objects and just convert the whole thing into a series of ...
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Good luck for yourself.
Stas Sokolov wrote:I deeply disappointed. No closures/lambda expressions no Method references. C# seems has all of those.
Pat Farrell wrote:
Stas Sokolov wrote:I deeply disappointed. No closures/lambda expressions no Method references. C# seems has all of those.
I don't see this as a problem for Java 7. Doing it cleanly, avoiding the crock stuff they did with generics is a good thing.
But, I'm not sure you can really do it well and still call it Java. I'd love to see a Java-like language that actually does generics and closures properly, which will most surely break backwards compatibility. Keeping backwards computability makes it impossible for a language to improve. Replace one of the A's with a B, like JavB
Good luck for yourself.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Rob Spoor wrote:Bad example. By instantiating just one class that implements java.util.Comparable you can do the same thing. You can even make the two Comparable's static final fields:
Good luck for yourself.
Stas Sokolov wrote:I know that it is all the same but just a way less of low level, interface specific coding.
Pat Farrell wrote:
Stas Sokolov wrote:I know that it is all the same but just a way less of low level, interface specific coding.
When its "all the same" then all you are talking about is syntactic sugar. Its the curse of adding features this late in a language's life that syntactic sugar that begets bizarre syntax is not a win.
Good luck for yourself.
Stas Sokolov wrote:Who the hack use the switch statement anyway ?
Paul Clapham wrote:Every time I feel that I have to use a switch statement I have to go and look up the correct syntax for it -- that shows you how much I need it.
And switch statements which use Strings as the case identifiers? Using string constants to choose behaviour just smells wrong to me.
Tell me how it all turns out. Here is a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|