Oracle Releases Java 10, Promises Much Faster Release Schedule (adtmag.com) 134
An anonymous reader quotes Application Development Trends:
Oracle announced the general availability of Java SE 10 (JDK 10) this week. This release, which comes barely six months after the release of Java SE 9, is the first in the new rapid release cadence Oracle announced late last year. The new release schedule, which the company is calling an "innovation cycle," calls for a feature release every six months, update releases every quarter, and a long-term support (LTS) release every three years. Java 10 is a feature release that obsoletes Java 9. The next LTS release will be Java 11, expected in September. The next LTS version after that will be Java 17, scheduled for release in September 2021...
The six-month feature release cadence is meant to reduce the latency between major releases, explained is Sharat Chander, director of Oracle's Java SE Product Management group, said in a blog post. "This release model takes inspiration from the release models used by other platforms and by various operating-system distributions addressing the modern application development landscape," Chander wrote. "The pace of innovation is happening at an ever-increasing rate and this new release model will allow developers to leverage new features in production as soon as possible. Modern application development expects simple open licensing and a predictable time-based cadence, and the new release model delivers on both."
This release finally adds var to the Java language (though its use is limited to local variables with initializers or declared in a for-loop). It's being added "to improve the developer experience by reducing the ceremony associated with writing Java code, while maintaining Java's commitment to static type safety, by allowing developers to elide the often-unnecessary manifest declaration of local variable type."
The six-month feature release cadence is meant to reduce the latency between major releases, explained is Sharat Chander, director of Oracle's Java SE Product Management group, said in a blog post. "This release model takes inspiration from the release models used by other platforms and by various operating-system distributions addressing the modern application development landscape," Chander wrote. "The pace of innovation is happening at an ever-increasing rate and this new release model will allow developers to leverage new features in production as soon as possible. Modern application development expects simple open licensing and a predictable time-based cadence, and the new release model delivers on both."
This release finally adds var to the Java language (though its use is limited to local variables with initializers or declared in a for-loop). It's being added "to improve the developer experience by reducing the ceremony associated with writing Java code, while maintaining Java's commitment to static type safety, by allowing developers to elide the often-unnecessary manifest declaration of local variable type."
6 Months? (Score:2, Insightful)
Is this Oracles attempt to finally destroy Java for good? How enterprise friendly...
Re:6 Months? (Score:4, Insightful)
The 'var' that exists in C# is one of the worst ideas ever and the fact that Java didn't have it was one of the benefits of Java.
'var' is an item for lazy coders.
Re: (Score:2)
'var' is an item for lazy coders. ...
Please explain
Re: (Score:1)
Easy: He's trolling. var is actually one of the best features in Java, just as auto is one of the best features of modern C++. Anyone who says otherwise is trolling.
Re: (Score:1)
'var' is an item for lazy coders.
'var' is necessary for anonymous types, which can be very useful in some scenarios. I do discourage lazy use of var for declaring instances of known types though.
Re: (Score:3)
And why would you want anonymous types - it's making it just a lot harder to understand the solution and also harder to do code analysis.
Re: (Score:1)
And why would you want anonymous types
It's another tool in a programmer's toolbox; if used properly, it saves time and effort. It saves you from a proliferation of classes that will only be used once, in some method scope. Having to distinguish for example between class Employee; class EmployeeDataFromDatabase; class EmployeeFilteredBySalary; class EmployeeWithSalaryAndBonus etc will NOT help with maintainability.
The compiler also defines GetHashCode/Equals for you implicitly, so you can use anonymous types in LINQ queries with less bother.
it's making it just a lot harder to understand the solution
Anon
Re: (Score:2)
Idiot. Do you not understand OOP?
You declare the variable as the superclass when you want polymorphism. In ChatHuant's example, only inheritance is desired.
Re: (Score:2)
You don't know what var is about ... makes you look like an idiot.
No var:
HashMap<String,Employee> employeeByName = new HashMap<String,Employee>();
Why do I have to write the left hand side before employeeByName when the compiler and a human reader implicitly sees that the type should be "HashMap<String,Employee>" ?
Hence we like to write:
var employeeByName = new HashMap<String,Employee>();
And all that has nothing to do w
Re: (Score:2, Insightful)
var is about creating code that is harder to read and maintain. The type isn't clear until it's assigned and that is a ticking bomb.
Maintainability of the code is essential in the long run. If you have to write some extra at the declaration is not a major issue.
Re: (Score:2)
Erm, ...
the assignment is in the same line as the var is, obviously. How can you not know the type?
No one is declaring variables with var at the top of a method and starts assigning values several lines later
If you have to write some extra at the declaration is not a major issue.
Actually that is what most developers hate: verbosity.
So it is not an issue, but an annoyance.
Re: 6 Months? (Score:2)
You can't use car unless it's assigned a value in the declaration.
Re: (Score:2)
private var rootGFile: com.google.api.services.drive.model.File = service.files().get("root").execute()
Re: (Score:1)
Re: (Score:1)
Re: (Score:2)
You could always do that :D
But perhaps you mean the new diamond constructor?
HashMap<String, Employee> map = new HashMap<>();
Re: (Score:2)
Use the interface, and donot repeat the generic by using the diamond operator that has been around for the last 5 years.
Re: (Score:2)
As you see, I used the diamond operator.
And in a /. discussion it makes no sense to use an Interface on the left side and a concrete typenon the right side.
It most of the time makes no sense in real code either.
Re: (Score:2)
Actually, I prefer
Map<String, Employee> employeeByName = new HashMap<>();
The variable is declared to the interface.
Re: (Score:2)
Do you not understand OOP?
Many people don't. You, for example. Yes, Smalltalk doesn't need var. Of course, it doesn't need to "declare the variable with the highest superclass" either.
Re: (Score:1)
In C# there are anonymous types, meaning that they don't have a name you can enter, and var was created to allow you to declare variables of those types. When you declare a variable of type Object you have to cast it to its subtype to reference its members. Since you cannot enter the name of an anonymous subtype, you'd never be able to access its members without var!
Now you may be wondering why anonymous types are necessary. The answer is that they're needed to avoid having to create and maintain a separate
Re: (Score:1)
Re: (Score:1)
For the same reason Scala and Go has them, when dealing with functional programming with classes it is really useful to select and filter only the wanted properties of objects (possibly with multiple different types, mind you) without having to declare every possible permutation of them as it's own class. It's still type checked and you don't lose type safety. There's more advanced uses as well.
I know it is easy to think C# must be bad because of Microsoft, but it is a very well designed language and other
Re: (Score:1)
var is NOT a variant or dynamic. It is type inference.
Re: (Score:1)
Re: (Score:2)
Yes, because all programmers are capped by typing speed.
Re: (Score:2)
I agree, in Java, it is recommended to declare variables as Object since it is an OO language. And this works since java 1.0!
Here is how I do it:
Object locale = new java.util.Locale("US");
Object count = new Integer("0");
Object lowerCase = "USA".toLowerCase();
This way, you will never encounter type problems!
Re: (Score:2)
Well,
... can you tell me why?
I just tried it, but
System.out.prinline(locale.toLowerCase());
does not compile
Re: (Score:2)
Sure! It is easy!
Do:
System.out.println(locale.toString().toLowerCase());
aahhh... beginners that weren't there circa 1.0! :)
Re: (Score:2)
Hehe, nice try :D
Actually my original code would have compiled, because there is a println() method that accepts Object's and calls toString() on them ... the parent was just an idiot I liked to tease.
Re: (Score:2)
Nope, your code would never have compiled.
System.out.println(locale.toLowerCase());
wouldn't have compiled since .toLowerCase() is undefined for Object types.
This would have compiled although and I understand that this was what you were trying to say:
System.out.println(locale);
Re: (Score:2)
Ah, right, that actually was my original point. ...
However your "object.toString()" misslead me again
Re: (Score:1)
Let me guess - you love using static method calls and can't see the point of unit
Re: (Score:1)
So you'd prefer to write code of the form
FooBarObjectWithALongAssName foo = new FooBarObjectWithALongAssName();
Rather than
var foo = new FooBarObjectWithALongAssName();
Re: (Score:3)
In my team, I allow using var in this case; however
is not allowed, because it makes maintaining the code more difficult.
Re: (Score:2)
If that makes your code more difficult to maintain, it was already a mass of shit.
Re: (Score:2)
If I did declare and instantiate in the same statement, I would copy/paste the name anyway!
Re: (Score:2)
Maybe you should have just ended the interview after they said they use C#. That's just as arbitrary but more likely to yield good results.
Re: 6 Months? (Score:2)
Anything containing an anonymous type?
So the one good thing: corporate stability is gone (Score:2)
There are other things I like about Java but a lot of them were stripped away by Oracle and the language "innovation". I like slow and stable. That's what Java was about. Not running after every fad. Thinking and taking things slowly.
That's gone. Shame.
So....Even MORE Broken Then? (Score:5, Insightful)
Problem with JAVA is syncing up all the damn versions between servers and clients.
FASTER versions isn't helping.
Re: (Score:2)
Re:So....Even MORE released Then? (Score:4, Insightful)
Why is "release early, release often" good for Linux, but not Java?
The correct comparison is between Linux releases and JVM releases. If you want to have new improved JVMs for the same language specification, go nuts, its all good. Everything will continue to run on the virtual machine, just like applications continue to run on the actual machine with Linux releases. Changing the Java language is akin to changing the Linux API. That would create application compatibility problems at the very least, most likely break many.
Re: (Score:1)
From a system administrator and desktop support angle this also creates a nightmare scenario of breaking client endpoint applications such as SAP or other IE specific websites.
Java 6,7,8, and 9 runtimes are incompatible with each other. Companies want one ancient jre to rule them all. Now the developers have to keep their apps secure BUT use an unpatched JRE or else the customer will find someone else who will. LOL
Gee this is why kids today don't want to learn Java.
Re: (Score:3)
Java 6,7,8, and 9 runtimes are incompatible with each other.
What is that supposed to mean?
A application compiled for Java 6 runs just fine on a Java 8 VM, and I would bet on Java 9, too.
To launch an Application with the "correct" JVM you have that magical thing called a PATH variable. You can have as many Java installations on your computer as you have disk space, nothing special here, nothing incompatible.
Re: (Score:2)
Upgrading to a new Java version hardly ever broke anything.
Java uses an annotation to @depricate parts of APIs ... but keeps those parts around for several versions.
Re: (Score:2)
You must not have been around in the early days. Perhaps it's better now, but I remember Java 1.x releases. There wasn't even forward compatibility at that point. That is, applications compiled with Java 1.2 would not always run correctly, or at all, on 1.3 VMs.
Re: (Score:2)
I never had a problem like that.
But usually when you are developing and mid term you upgrade the VM/JDK, you recompile anyway.
Hm, I believe there was indeed a problem with Java 1.3, I remember Java 1.4 broke serialization on IBM VMs, or cross serialization between IBMs and SUNs VMs ... don't remember.
Instead of not updating the JRE every few years (Score:3)
I'll now not update it on a 6 monthly basis? :/
Re: (Score:2)
Shrugs shoulders and will keep installing Java6 and java7 JRes for my users.
Re: (Score:2)
I guess you could move to java 8. I plan to stay on 8 for while.
So (Score:3)
why not Kotlin? (Score:2)
And if you think I'm updating my Java environment every 6 months then you must think my farts smell like rose water.
Did anyone ask for this? (Score:3, Informative)
I don’t think I’ve ever heard anyone ask for a faster release cycle for java.
I have, however, heard (many times) people requesting that java die in a fire.
Re:Did anyone ask for this? (Score:4, Insightful)
Re: (Score:2)
users probably didn't ask for this, but java developers sure did.
that is why you have so many open source libraries available for java that complements it with things people find missing in the core language.
a great example is joda time, which does time handling/manipulation and almost everybody used. while a decent native solution has only been available since java 8.
This will be a good thing (Score:5, Insightful)
Explicit LTS versions vs non-LTS will enable the conservative to have a roadmap and the adventurous to keep going with new ideas and features where the two eventually converge.
I'm personally quite sick of joining "enterprise" teams that use wildly past their shelf life versions of Java and then get indignant when I pointedly ask them WTF they're doing calling it "secure" when the product has been abandonware WRT security for over a year.
Right now it feels like "Java 7 vs 8 vs 9" is a matter of opinion. Now at least we can say "you chose a non-LTS version and didn't keep up... WTF?" and stuff like that. Oracle is at least now saying "this is for this type of user and that is for that type of user" and if you try a third way the answer is "you're wrong" unless you accept full responsibility.
Re: (Score:2)
We still use Java6 at work lol. Change for the sake of change is expensive and our Oracle12g based tools and version SQL Developer work best onthat version. Upgrading puts us on a rent like EULA so we can't ever upgrade according to our finance guys. My previous employer just switched to java 7 and will stay there for years to come. All it;s customers have standardized only on Java jre7 for things like certs and code signing so we need an ancient version to make sure their tools work on our machines.
Oracle
Re: (Score:2)
I think that a LOT of organizations are still using Java 6 and Java 7 in their business. I know that last two organizations that I worked for have.
An officially LT supported Java 11 release might be the excuse they were looking for to skip upgrading to Java 9 and Java 10 and go straight for that version.
Re: (Score:2)
What would be an alternative to Java?
C#/.NET? I don't think so.
So, what else? We could put a nice tool chain on CLANG to support everything that Java can, e.g. Reflection/Introspection/Serialization ... but it seems no one is doing that at the moment.
A sanitized C++ running on a VM with optional GC, that would be fine ... but I see no one going there.
Or an open source Eiffel ... but then again it would be verbose like Java.
On the other hand, image based environments like Smalltalk would be cool, no one is r
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Because it lacks all the open source tools and libraries, Java has. It has no web server, like tomcat e.g. .Net
C# versus Java is simply an awful language, but you could use managed C++ of course, that wold be a plus. Most Java alternatives like Groovy, Scala, Kotlin etc. doc. don't run on
And the naming conventions of C# just suck :D a pain for my eyes ...
Re: (Score:2)
C#, the full language, is years ahead of Java and a far, far better language. So much less boilerplate with C#. Heck, Java is plain unusable without Lombok.
OTOH, until the language has fully rich open source support on Linux, I'll pass. Does seem to be headed that way, however, so I'm hopeful.
Re: (Score:2)
I guess that is a matter of taste, I find C# nearly unusable and you think the same about Java ... but that is why I mostly use Groovy and hope that my current project slowly shifts to Scala :D
Re: This will be a good thing (Score:2)
None of the statements of fact about c#/.net in that post are correct.
Re: (Score:2)
I've looked at Tomcat in the past and could never understand why anyone would want such an unwieldy piece of shit - sure, .Net has nothing like it (thank fuck), and as a result I prefer to use OWIN self hosting or Kestrel httpd (the .Net Core httpd by MS) for my web apps, and stick them behind a standard reverse proxy like Nginx or HAProxy so the heavy lifting is done by an app dedicated to it.
Lack of a "Tomcat" is not a negative., and you seem to be missing the massive nuget library which is mostly open so
Re: (Score:2)
Tomcat was just an example for the implementation of the Servlet API.
APIs in Java are generally defined by experts of the field.
In .Net I have no idea why everything is so horrible unusable. But: I did not use it since 10 years, so perhaps it got better ;D
Re: (Score:2)
What would be an alternative to Java?
C#/.NET? I don't think so.
So, what else? We could put a nice tool chain on CLANG to support everything that Java can, e.g. Reflection/Introspection/Serialization ... but it seems no one is doing that at the moment.
A sanitized C++ running on a VM with optional GC, that would be fine ... but I see no one going there.
Or an open source Eiffel ... but then again it would be verbose like Java.
On the other hand, image based environments like Smalltalk would be cool, no one is really pushing that either.
So, it looks like we are stuck with Java the next 30 years.
I for my part don't mind that.
Easy Erlang the new hip rockstar language [youtube.com]
Re: (Score:2)
Erlang is nice for highly interactive multi threaded environments, e.g. in telecommunications.
But pretty difficult to use for desktop applications or apps.
Perhaps OCaml ...
Re: (Score:2)
Actually you should have the recent JDK/JRE for modern libraries, like the streams, but program in Scala and Groovy ... the progress Java makes as a language is simply not radical enough.
Don't we want a slower release schedule. (Score:1)
The best would be 1 release, no schedule. A complete language fixed in its function forever with no bugs.
Having a faster release cycle means either they are spinning the language or patching a lot of bugs. So yes patching the bugs faster is better but I would prefer they spend the time to not have bugs in the first place.
The cancerous meme of fast release schedules. (Score:3, Insightful)
They serve no good point, but virtually guarantee lower quality. Yet, like flat UIs with non-detectable interactive elements, they have to be done, "because everyone is doing them".
The stupidity of humanity is without bounds.
Re: (Score:1)
Yeah, the subject line should read "Oracle Releases Java 10, Threatens Much Faster Release Schedule".
var: useless feature (Score:2)
Right way: ask your ide to guess the variable type, and insert variable with this type. It's good to know if the inferred type changed.....
Just what we need (Score:1)
Queue all the complaining from being behind and not wanting to move to the new version... AGAIN!
Just went though a bunch of BS from old lame versions that vendors LOVE to include in their distro of software so their broken code will work.