Java 7: What's In It For Developers
GMGruman writes "After five years of a torturous political process and now under the new ownership of Oracle, Java SE 7 is finally out (and its initial bugs patched in the Update 1 release). So what does it actually offer? Paul Krill surveys the new capabilities that matter most for Java developers, from dynamic language support to an improved file system."
I assume the author meant, "... to improved file system access." See here.
If you reply, do so only to what I explicitly wrote. If I didn't write it, don't assume or infer it.
It's just improvements to the I/O API. Java has the New IO API for doing I/O. java 7 has extended it, hence NIO2. http://www.ibm.com/developerworks/java/library/j-nio2-1/?ca=drs-
Ah yes. The old "blame the language for the lack of a developer's skills" ploy. It's a sad carpenter who blames his tools for his incompetence. It's a sadder carpenter who blames a tool for other carpenters' incompetence.
Just curious: what do you think all those "Java weenies who couldn't code themselves out of a paper sack" would do if Java died. Would they magically become skilled code gurus because Java doesn't exist? Or would they be incompetent coders in a different language?
As Dilbert so succinctly put it: you're solving the wrong problem!
While you are busy being a jackass and letting us all know you have never made a single mistake EVER with resource allocation, some of us have work to do and enjoy the fact that we will never have to type try{openFile}catch(DamnException){}finally{try{closeFile}catch(AotherDamnException){}} ever again.
Let me get this straight - you think that a harder programming language increases programmer competence. While I'm not defending Java, this logic is deeply flawed.
If you follow it to it's logical conclusion, the best programmer's flip the machine bits by hand...
If our elected representatives no longer represent us, do we still live in a Democracy?
Well since JDK downloaded, ant XML in my head,
jars, wars, and .class files all night with laptop by my bed,
well java you look so fine (look so fine)
for C++ errors took all my time,
for you to help me java
get Stroustrup outta my heart.
help me java, help help me java
help me java, help help me java
.........
help me java, yeah, get him outta my heart.
Bjarne was gonna be my god,
and we gonna be his bitches,
preprocessor bloat came between us,
patterns ruined by the glitches
Yes. Let's shun all advances in programming language design, because they make it too hard to use languages without them.
Man, imagine what'd happen if you ever ran into a programming language with a good design. There are some out there that are actually pretty good. Of course, no language is perfect - or even close. But people who resist making things better just because it makes defects in existing languages more obvious is doing themselves, and the entire field of software engineering, a disservice.
Obligatory xkcd
If you follow it to it's logical conclusion, the best programmer's flip the machine bits by hand...
Correct: the best programmers can use machine code if needed. But the best programmers also don't abuse the apostrophe as much as you did...
Those who can make you believe absurdities can make you commit atrocities. - Voltaire
Arguments for slow Java are so 1990's. Every Java application, desktop or otherwise, I have written has been very snappy, very responsive. Swing has always had places where you can get caught making your own application slow to load or slow to respond. I believe that the community and Sun have really ushered in conventions to mitigate that. SwingWorker (part of core Java Swing), Timing Framework [java.net], JPA (especially our friends at Eclipse), and other community frameworks have really changed the way coders write Java desktop applications in ways that avoid a lot of the pitfalls that came with the 1.1, 1.2 and so on versions of Java.
I think this is the reason why Oracle really needs to embrace the community. It has been because of them that Java has gotten better and faster with each release. People who still talk about how slow Java is and how crappy Swing is, are still living in the past. Is it the perfect platform? No, but it has gotten multiple times better than where it was.
once you have programed in Java for a few months you are incapable of writing functional C++ code
Having been a Java developer for eleven years now, I still write C++ with few memory leaks and a couple of passes through a debugger usually fixes that. I am not sure why people believe Java makes you a bad programmer. Java, C#, and C++ all follow the same design patterns, they just use different methods on getting there. It is really not that hard to remember, hey in this language the object is GC and in this one it isn't. A singleton design pattern in C++ and Java look exactly alike and function exactly the same. Java you don't have to worry about cleaning the mess up and in C++ you clean it up in the destructor, c'mon some people make it out to be the difference between gutting a fish and brain surgery. It's all syntax sugar, a lot of people need a new argument.
If you follow it to it's logical conclusion, the best programmer's flip the machine bits by hand...
Correct: the best programmers can use machine code if needed. But the best programmers also don't abuse the apostrophe as much as you did...
If I found out someone was manipulating code at the machine level - I'd definitely have issues with that. You lose portability and expose yourself to a nearly infinite amount of issues - there really aren't many cases left where this would even be remotely advisable.
:p
PS. Nitpicking grammar - that's nearly as bad as using machine code directly.
If our elected representatives no longer represent us, do we still live in a Democracy?
Among the delayed capabilities are adding Lambda expressions, or "closures," to Java for multicore programming, ...
Lambda expressions are not closures, and neither enable parallelization. Yes, the Wikipedia articles for both are dense swamps, but couldn't you have at least tried to ask someone? Please?
Bio questions? Ask me to start a Q&A journal. Computer analogies available for most topics!
Do you believe, not having to close unlock things makes you a better programmer?
No and that's not the point of these features. A car can have a manual or automatic transmission. Either one won't prevent the driver from being an ass to me on the road or make them a safer driver overall. Likewise, the features aren't there to make one a better programmer or a programmer who is bad at resource handling suddenly better. The features are there to handle certain cases automatically, cases where we've already had a solution (using finally) but would have preferred it to be less verbose.
Likewise, GC has been a favorite subject of C++. Should we have GC in the core of C++ or not? There is always a third party library that can add GC to your C++ project. Does using that library make you a bad coder?
Making your job easier is not equal to making you a bad coder. A bad coder *is* no matter the language, platform, or libraries used. When I develop applications that need to talk to a DB, I have to think about when I need to let that connection go, it doesn't matter if I am using Java or C++ or Python, when to let go of a connection is part of the design, not the language. The language part only dictates how many lines of code it will take to let the connection go, not when. If you are not thinking about how you handle resources it is not a problem of the platform so much as it is the design phase. Even in GC environments you have to keep track of what is happening to your resources, you just keep track of them in a different manner.
As a rough example: I open a file in Java or C++, I still have to think about how that file will be used and when I need to close it (no other option in C++) or just let it close by itself (an option in Java but not usually the best one.) If we are talking about a text file that only the current running application is going to use then yeah let it close by itself in Java and close the file in the destructor of the main delegate (or whatever you may have used to open the file) in C++. Both of those options function the exact same way, the file doesn't close until the application does. It's just syntax sugar that separates them, either way I've got to remember that I have a file open.
I did not say its currently the case, looking at the article I suggested/said it could be going there.
That's been an argument for decades for everything. Again, making something easy does not make a bad programmer. Bad programmers tend to not think things out fully and giving them a manual or automatic isn't going to change that.
To be fair here compared to other interpreted languages Java is still the king of the hill. By far.
Disclaimer: Yes, interpreted. Bytecode is interpreted, even with stuff like JIT.
It sounds like even Oracle, itself, doesn't think Java 7 is ready for the public!
And they are right indeed...
Thats why the summary links to an article. You must be new here.... oh wait... You'll fit in great here. Carry on.
I want this account deleted.
Are you trolling? You said:
They haven't "extended garbage collection", they've introduced syntactic sugar. Instead of this (with real indenting in real life because you're not limited by Slashdot's lame commenting system):
You can have something like this:
So either you're trolling or "The Dawn Of Time" is right: you have no idea what you're talking about.
Ian
I believe not having bugs makes you a better programmer, and if the language helps enforce that by design, even better. If you're trying to prove yourself by doing things manually that computers are capable of handling for you, you're programming for the wrong reasons. Users don't give a shit how you made the product; just that it doesn't crash or leak.
I totally agree. Also, it's not about the noobs. I suspect most experienced java programmers cant' code the correct try/catch/finally/try/catch for a resource access without looking it up. Check http://stackoverflow.com/questions/4092914/java-try-catch-finally-best-practices-while-acquiring-closing-resources
Well it is. It has new asynchronous channel functionality and the FS stuff also allows Java to watch directories, walk through them, examine attributes and other stuff. Java is generally a good language but some stuff particularly Date & Time and IO have been pretty mouldy and long over due a revamp.
Thanks for the object lesson dick.
You thank him for the lesson which is strange since you seemed to misunderstand it.
1. Raii gives you the -ability- to reclaim resources after a fault,
No, it automatically reclaims them. E.g.:
osfstream f("tile.txt");
throw "An error!";
now f is automatically flushed, closed and reclaimed.
2. If you mean writing a hell of a lot of useless boiler plate and trouble laden code
Well no, not really. In this case, the C++ version is shorter and therefore less error prone.
SJW n. One who posts facts.
"Write once, run anywhere" was like communism -- an idea that sounds nice in theory in some ways but utterly fails to work in reality.
True, if you hardcode C:\something or /somethingelse in your app. I've never had cross-platform problems, either on big server side applications or trivial desktop ones. So I guess 'utterly failes to work in reality' is somewhat dependent on the developer.
I love Python, don't get me wrong, but it is nowhere near Java regarding raw performance. Even the developers acknowledge this, with stuff like the Google sponsored Unladen swallow and PyPy.
Haven't toyed much with Ruby these days though. I should :)
Let me get this straight - you think that a harder programming language increases programmer competence. While I'm not defending Java, this logic is deeply flawed.
Glad to know you're here to fix the entire world's education system. Sorry, but YOUR logic is deeply flawed. With your logic, none of the "good schools" are actually any good. So yes, clearly those capable of mastering difficult tasks show they are better in any way.
I'm going to take a wild stab here and say, perhaps you are a Java programmer? And even if you are not, YOUR logic is dubious at best and in no way invalidates the line of thinking which spurred your initial response.
C# had it 10 years ago.
Lisp had it 30 years ago. Go suck eggs.
That is great (really), but it does not support inheritance.
Huh?
If you want inheritence, you have to do it with pointers.
auto_ptr p(get_from_factory());
throw "An error!\n";
Is that what you meant? It still works...
SJW n. One who posts facts.
Not speaking for the GP, but my take is that the harder the language, the less incompetent programmers it will attract.
Think about it this way: if any idiot can do VB then every idiot will do VB (in preference of other languages).
That said, if a language is merely hard, with no added benefits in power, expressiveness, etc., it will also fail to attract the competent programmers.