Everything About Java 8
New submitter reygahnci writes "I found a comprehensive summary of the developer-facing changes coming in Java 8 including: improvements to interfaces, functional interfaces, lambdas, functions, streams, parallels, date/time improvements, and more. The article includes example code with realistic examples of use as well as explaining the reasoning behind some of the choices made by the developers who are working on Java 8."
Will it be more secure?
I can't wait!
Did you Ctrl+F the linked page for "secu" too? I didn't find anything.
The Java language changes too much. All this meddling with the language isn't okay. It screws with compatibility, screws with VMs, screws with IT departments, etc.
And from the programmer's point of view, it requires constant education and rewriting of code with very little benefit. What was the problem with the old language?
This is all because the language is managed by a corporation. At least the standards bodies don't give us new versions more frequently than once-per-decade. (Although I don't think C needs the periodic changes it gets either.)
Also, get off of my lawn.
Or I guess it could be considered relatively important also not to allow drive-by downloads of malicious software from webpages that you didn't even click anything on
Isn't it amazing how to the hottest stories Slashdot always appear on Hacker News 18 hours earlier?
Has it stopped being an overly-verbose, memory-hogging, slow pain the ass?
I suppose someone still makes buggy whips, so why not Java version N+1? at least some fraction of this shrinking niche will fail to recognize that programming "investment" is a sunk cost...
Highlights of Java 8 include
Green solutions. Advanced power management features, and automatic tracking of each thread's carbon footprint. An console allows users to see the carbon footprint of each thread in real time.
Social networking. Users can share jar files on social networks, and like their friends jar files.
Cloud computing. Java 8 will be the first VM built for the cloud.
you run untrusted code, so it's the only place being able to skirt the securitymanager matters.
Actually, there may be security isolation in Java EE servers, but there isn't much payoff
for sneaking around it.
...is it as good as C# yet?
I thought it was already the best write once run anywhere programming language in the world. At least that's what all the cool kids tell me. What could be left to improve?
Its shrinking the say way as say the browser Silverlight plugin, the Adobe Flash plugin or the abomination called "Active X"
In the next few years we will probably run a little experiment of moving from sun java 6 to oracle java 7. Perhaps the attempt will fail at first and we will postpone the upgrade for another year or so, and then try again. But Java 8 ? Let me call you back in 5 years... or maybe 7.
There is a real, major benefit of using Java over other languages, such as C or Haskell or Smalltalk, which is this: it lets you work with other mediocre programmers, and has limitations that prevents them from doing anything too crazy. That is, even if they write horrible code, it won't be so bad that you can't work with it (I'm sorry fellow Java programmers if that offends you, but think of where Java is used most).
That said, I'm somewhat concerned about some of these changes. Lambda functions are great, but one of the benefits of functional programming is the lack of side effects. Under the Java 8 design, lambda functions allow you to modify member variables, which means that benefit is completely gone. This means lousy programmers will be able to write incredibly complex code, with strange side effects, that is hard to use.
The new streams functionality is fine, but did they really have to call it streams? When there are already Streams in Java?
String.join() is great. Finally.
The new Date library looks fine. It better be good enough, because do you really want yet another Date system added into Java?
"First they came for the slanderers and i said nothing."
If things like Kawa Scheme and Scala already run on Java, what advantages is there for functional interfaces? Will these projects be able to benefit from these advances? In what way?
Finally a version that is not loaded with security issues relatively and can run all the software out there. Java 7 was truly terrible and has too many updates. There is no time for that at work.
Java 7 had 50 patches in just one month!
Java 6 does not have nearly the amount of vulnurabilities and is right up there with XP. It works and is mature and I do not see a reason to change.
I wonder what it will break next?
http://saveie6.com/
If I'm running Java 8, I'd like the version number to actually be 8 instead of 1.8 please. It really confuses people to this day.
as all it seems to be doing now is playing catchup to something like Scala which has at least thought out the functional stuff maybe a bit more
The C++ compiler doesn't manage resources entirely for you. You need to do that yourself in your destructor.
The destructor needs to be written once and only once, and for an object not created with new, the destructor automatically gets called once the object falls out of scope. In Java, you have to remember to finally { something.close() } or to try-with-resource every single time. Python is somewhere in the middle on this: because CPython's garbage collection uses reference counting, destructors get called automatically for anything that isn't held by a cyclic data structure, but Python also has with that acts somewhat like Java 7's try-with-resource.
Project Lambda from what I have gleaned has as its goal not necessarily feature parity with other programming languages, but instead speeding up certain multicore computations. It is therefore an experiment, and as its coding is not done yet, no one can be sure whether the experiment will be a success. What if the speed-ups simply don't happen once the implementation is finished? Given that Project Lambda may already be delaying some of Java 8, even though it was supposed to be the focus of Java 8, why couldn't Project Lambda be dropped if the experiment fails? There already seem to be so many compromises with the syntax compared to other languages that usage of Project Lambda may not be intended for general programming. Face it, the time to put in the equivalent of Project Lambda was near the dawn of Java, not trying to retrofit it at such a late stage. Perhaps it would be better to shelve it indefinitely as the community never had its heart in the concept.
Ever since autoboxing was added, it's already implicitly overloading operators for all of the object wrappers around atomic types anyways, and it's always implicitly overloaded the + operator for the String object, so the objection that it adds complexity should not be an issue. The only real remaining objection about unreadability that always seems to arise when the subject of operator overloading on user-defined classes is raised is actually entirely isomorphic to complaints about function or variable naming practices where the identifer's name doesn't effectively convey any sense of what the identifier's real purpose is... Java doesn't stop a programmer from using global class name like qxj, for instance, so it makes no sense to prohibit operator overloading merely on the suggestion that the resulting program is harder to read or maintain (and even then, such an identifier may even have a legitimate purpose in certain contexts.... but then, so can operator overloading, which is my point)
File under 'M' for 'Manic ranting'
Java 1.6 is the engine for java ee servers such as IBM websphere and tc server. there are still patches for 1.6 coming out, we just installed some at work recently for both the IBM and "Sun" (oracle) jdk
in fact, java 7 is optional add-on for websphree 8.5
I'd like to see a Date that can be missing some fields, such as "early january", or "2013" and have the objects be Comparable and yet not forget that their actual value is not exact. For instance, "early" in a month might mean the 5th in terms of comparison, but its toString() would say "early January", and a year without further specification might compare as June 30th.
These sorts of things are helpful when you're recording researched data and don't want the persnickety exactness of the representation to hide the fact that you don't know all the fields.
tone
does it break backwards compatibliity with 7, like 7 did with 6?
that's been one of my major gripes about Java, write once, run anywhere until the jvm version changes, then you can be screwed.
It's a security nightmare, slow and bulky as hell, hard to code in, and horribly impossible to make cross-platform despite that being the point. Bye bye, Java. Good job shooting yourself in the foot.
This is the proverbial rearranging deck chairs on the Titanic. The JVM still sucks and as a results things like lambdas don't function correctly. The type system and templates still don't work correctly. The libraries are still as bloated as ever. And no sane person would trust Java security anymore.
Yummy, yummy!
Without a public, searchable bug tracker, I've no way to know whether the annoying SAX parsing bugs in JDK6 and JDK7 have been fixed or not. Has somebody reported these bugs? Are they being deliberately ignored or do they simply not know about them?
Now that it's "Open"JDK, there's no good excuse not to have a decent (and public) bug reporting and tracking tool, is there?
Java is DOA... no point. the Java Update scheduler nagged me for a month before i finally replaced my known weak build (with the well known vulnerabilities) and you know what the little shit did? it went and put the ask.com toolbar on all my browsers (UNASKED!) so now i know, it's more crapware, bloatware, and basically malware... Java is dead. rest in shit.
You've listed some languages that mediocre programmers use; now would you please share your opinion on what languages great and exceptional programmers use?
That that is is that that that that is not is not.
Java 8 still doesn't have properties, async/await, LINQ, dynamic, named parameters and so much more that C# has now.
Because memory is special. It's isolated from other processes.
How does that make memory any more special than file handles or network connections? Other processes can't see those either. The GUI is likewise isolated, as an application generally can't scribble over another application's windows.
Let's go deeper: In a growing number of operating environments, the file system is isolated from other processes. At least four operating systems that I'm aware of create the equivalent of a separate user account for each application's private files: IOS on Wii, Sugar on OLPC, iOS on Apple devices, and Android. HTML5 likewise separates local storage and IndexedDB access per origin, and it is up to each origin how much cross-document messaging it will allow. When the device's owner chooses to uninstall an application, the user can choose to uninstall its private files as well.