
Java 10 and beyond – a look at the potential language change - based2
https://zeroturnaround.com/rebellabs/java-10-and-beyond-a-look-at-the-potential-language-change/
======
zmmmmm
The rapid release cycle is going to pose challenges downstream for all the
people developing tooling and other aspects of the ecosystem which are not
used to moving that fast (eg: Groovy still grappling with the module changes
to Java9, let alone 10 or 11). While we all griped about it for many years,
the slow pace of Java evolution was in some ways one of it's biggest features.
I am curious to see whether the community starts to move fast too, or if
actually what happens is that people completely ignore the non-LTS versions
and we actually get an effective release cadence of 2-3 years or so in
practice.

~~~
giancarlostoro
That's just it, some projects will likely try to catch up just in time for the
next LTS, while others may run a similar set of release branches, one
targeting the LTS or the latest release. It's really dependent on individual
projects, not so much the whole ecosystem at once. In Rust we have web
frameworks that run on the Stable compiler, and then there's Rocket which
currently only runs on the nightly compiler (at least last I checked).

~~~
steveklabnik
Rocket is still on nightly, though getting pretty close!

------
rb808
I like quite like Java but Oracle scares me. They've started charging for
runtime licenses, which I never heard of before. Oracle is a good enough
reason to avoid Java.

[http://www.theregister.co.uk/2016/12/16/oracle_targets_java_...](http://www.theregister.co.uk/2016/12/16/oracle_targets_java_users_non_compliance/)

~~~
imglorp
Your fear of Oracle aggression is well placed.

Please someone correct my perception here, but it looks the the goal of the
rapid release cadence is now to get more enterprise support contracts: if you
want to stay on LTS, you have to pay.

~~~
dnomad
I think it's doubtful that anybody will be able to correct your FUD. Once
you've bought into this delusion it really seems to trap people forever and
rags like the Register are absolutely delighted to feed the fear with nonsense
articles for precious clicks. Nothing can change the mindset. It doesn't
matter that Java itself is completely open source (Open JDK), that Oracle
isn't doing anything they haven't done before (you've always had to pay for
support of EOL'd JDKs and JDK 8 is five years old like other EOL'd releases),
or that, frankly, Oracle's actual track record here -- that is when you look
at the actual actions taken by Oracle over the last ten years -- is generous
to a fault. None of this matters to somebody who is committed to the FUD.

In the end the thousands of businesses an thousands of open-source projects
that use Java will continue to use Java. Others will invest in the FUD around
Java and Oracle. Life will go on. It'll be interesting to see who comes out on
top.

~~~
michaelmrose
Isn't the support window for each iteration going to be like 6 months?

[http://www.oracle.com/technetwork/java/eol-135779.html](http://www.oracle.com/technetwork/java/eol-135779.html)

Aren't we talking about the company that wants to copyright api no matter what
effect his has on the rest of the industry.

The same oracle that buys and kills interesting project making the world a
less interesting place.

The people that are suing google for violations that the original owners of
the IP tacitly allowed.

You are awful quick to call criticism of oracle FUD and delusion. Are you sure
you don't work there?

~~~
peterashford
How does this revoke the open source nature of the OpenJDK?

~~~
imglorp
It doesn't, rather I think Oracle's plan will end up driving people towards
OpenJDK.

It looks like they're firing their pesky B, C, D, and F customers and keeping
their A ones, ie the ones who will pay millions in maintenance.

The rest of us, who are currently tied to Sun Java for its stability and who
aren't going to pay big maintenance, will have to switch to OpenJDK if we want
stability. It's either that or constantly port every 6 months, and pray all
the kabillion dependencies we have work okay.

------
kzrdude
The backtick is just a problematic character. Python 3 had good reasons to
drop it, so I'm surprised when anyone else starts to use it.

Among the reasons Python devs cited were that it was hard to get printed
correctly in books, and hard for users to write in general, depending on
keyboard layout.

~~~
jug
Yup, using a grave accent as a symbol in this time and age of Unicode is just
clueless. It's a symbol usually used as a diacritical mark for letters, like
è. It's thus often a "dead key" (a key that awaits the next one because it is
expected to be used combined with another), just not on US keyboards. How hard
is it to at least consider the general set of Western keyboards before
deciding upon these things?

Hint: Let programming languages use characters 1) in the ASCII character set
and 2) not diacritical marks, and you'll be fine... It's honestly not rocket
science. I think it's a programming language designer's responsibility to just
know these things in 2018.

In the competing .NET Framework, @ is used for raw string literals, as in
@"raw string". The diacritical marks ~ and ^ do occur there for bitwise
logical operations and ~ in declarations of destructors but I don't think this
is optimal. I never really understood why they inherited C++'s destructor
syntax to have a semi-obnoxious special symbol just for this particular one
case that is used at most once per entire class definition, that is shared
with bitwise complement (???), no less... Is it so bad with keywords? Or why
not just use "!" as in "not". It would at least make more sense.

------
bitL
Those changes seem to look like a completely new language, cross of
Java/Scala/Swift - why don't they call differently, like Jalaft? The main
reason to use Java was its backward compatibility. If I needed to learn a new
language every 6 months, I'd learn another one to be honest.

~~~
tytytytytytytyt
Will it not still be backwards compatible?

~~~
CrendKing
If a new language feature is available, someone in your team will start to use
it, because it compiles, and code becomes shorter, so why not. And you will
have to review their code daily, which forces to "relearn" the language. I
think this is why OP complains.

~~~
nradov
What's wrong with relearning the language? That's nothing new for developers.

~~~
bitL
Why wouldn't you rather learn a new one if your old one is changing rapidly
into a weaker version of some other language that did it better already? I
personally don't care at all about those new things; I have them in Scala, I
don't need them in Java. I can mix those two as I like anyway.

I'd much rather see type erasure fixed, as that messes up every single
language based on JVM. But that would be like "the incompatible change" of a
decade...

~~~
virtualwhys
> I'd much rather see type erasure fixed, as that messes up every single
> language based on JVM

What? Type erasure is one of the main reasons why the JVM is targeted by so
many languages (Java, Clojure, Kotlin, Scala, Groovy, JRuby, etc.). Had the
JVM gone the way of the CLR the programming language landscape would probably
look a lot different than it does today.

Perhaps you mean lack of support for value types? That does affect every
language running on the JVM.

~~~
xg15
> _Type erasure is one of the main reasons why the JVM is targeted by so many
> languages._

As someone who grapples with erasure as well, I haven't heard this argument
before. Could you explain that?

------
virtualwhys

        int val = switch (str) {
          case "foo" -> 1;
          case "bar" -> 2;
          case "baz" -> 3;
          default -> -1;
        }
    

Looks a lot like Scala:

    
    
        val foo = match (str) {
          case "foo" => 1
          case "bar" => 2
          case "baz" => 3
          case _ => -1
        }
    

Interestingly the underscore character is now reserved in Java, wonder what
use case(s) they have in mind there?

~~~
krzyk
Regarding "_":
[http://openjdk.java.net/jeps/302](http://openjdk.java.net/jeps/302)

Example:

    
    
        BiFunction<Integer, String, String> biss = (i, _) -> String.valueOf(i);
    

It basically means that one of the lambda parameters is unused.

And citing this JEP 302:

    
    
      We are now free to complete the planned rehabilitation of underscore
      to indicate an unused lambda, method, or catch formal parameter.

~~~
virtualwhys
Scala overloads underscore in various ways, my favorite being:

    
    
        val emails = users.map(_.email)
    

Unlikely that will make its way into Java anytime soon, if ever, but it would
be a nice enhancement -- being forced to pepper your code with lambda
expressions a la `x => x.foo` is annoying when the alternative `_.foo` conveys
the same meaning.

------
Nuzzerino
As someone who hasn't used Java since the early 2000s, I am surprised that it
took them this long to get some features that I have taken for granted for
many many years elsewhere. What surprises me even more is that there are Java
islanders treating this update as something to be proud of. Can someone
enlighten me as to why this language is still popular? I get that there is
legacy software that uses it, and therefore a demand. But what is the appeal
otherwise?

~~~
ktosobcy
It has easy learning curve, it's verbosity while cursed upon makes it also
easier to grasp the code by less-then-expert, it's performant, it has huge
ecosystem, it can run everywhere.

In principle - it's just convenient in many ways.

~~~
random4369
C# ticks all the same boxes and is much better from a language point of view.

The only reason Java still exists is because it created a generation of
professionals who only know Java, only do Java, and won't learn anything else.
That group is still large enough to maintain critical mass and create new
greenfield Java projects despite the fact that Java is a shit-poor choice of
language for those projects today.

~~~
kllrnohj
C# was too tied to Windows for too long, it lost the mindshare outside of that
ecosystem.

Also that whole "Android" thing happened.

~~~
random4369
> Also that whole "Android" thing happened.

Yeah, and Google made their opinion of Java quite clear by adding first-party
support for Kotlin.

As for Java being popular because it has mindshare, you are agreeing with my
original point. It doesn't continue to exist because it's a good language. It
continues to exist because of inertia.

~~~
bitmapbrother
>Yeah, and Google made their opinion of Java quite clear by adding first-party
support for Kotlin.

Which is good for Android developers as they crave that syntactic sugar.
Unfortunately, businesses have different priorities.

>As for Java being popular because it has mindshare, you are agreeing with my
original point. It doesn't continue to exist because it's a good language. It
continues to exist because of inertia.

It may not have all of the syntactic sugar that other languages have at the
moment, but given its new release cadence its only a matter of time before it
reaches feature parity.

------
karianna
For those concerned about being forced to use Oracle’s JDK / support you can
definitely just use OpenJDK now. The build farm we have put together at
AdoptOpenJDK.net will produce professionally tested OpenJDK binaries for all
major versions and platforms with free LTS support. You can then also always
go to a commercial vendor like Oracle for extra paid support if that’s what
your org needs.

------
kasperni
I really do not understand why this is getting so much hate? I really think
this new time based release versioning is much preferred to alternatives.

I think the biggest problem is that it is in the nature of most developers to
want to live on the bleeding edge. We want to have these new shiny purple
things. And it just hurts us deep down inside to go with the safe and mature
option.

Again, nobody is forcing you to adapt a new version as soon as it comes out.

~~~
cstejerean
Except you are essentially being forced since the previous version becomes
immediately unsupported. By the time you consider and work through all the
implications of upgrading to Java 10 it will be September and Java 11 will
have come out, and Java 10 will be obsolete and unsupported. That’s a bit
crazy for a major version that just came out in March.

~~~
krzyk
You can start testing new release before it is out. E.g. for 11, you get final
RC at 8/30, and the release is on 9/25\. Which means that you get almost a
month while you can be 99% sure that you are testing with the target JDK.

And also, the cadence means that java changes will be much smaller, so no more
big bang like Java 9.

The only real problem might be the bytecode releated libraries like
ASM/bytebuddy, those need to move faster then previously (and they are, e.g.
butebuddy already supports java 11 bytecode version).

~~~
nikanj
"Almost a month" is a laughably short testing period in many of the industries
Java is commonly used.

~~~
krzyk
OK, in that case you shouldn't upgrade to a non-LTS version.

If you can do testing in a month than use non-LTS, it is quite simple.

------
chvid
I think what Oracle is doing wrt. LTS is actually quite reasonable.

However they adopted the versioning scheme from Ubuntu and I honestly think it
is confusing.

What really is going on is this:

    
    
       1 Major version 1
       2 Major version 1 + latest and greatest features pack 1
       3 Major version 1 + latest and greatest features pack 2
       4 Major version 2
       5 Major version 2 + latest and greatest features pack 1
       6 Major version 2 + latest and greatest features pack 2
       7 Major version 3
       8 Major version 3 + latest and greatest features pack 1
       9 Major version 3 + latest and greatest features pack 2
       ...
    

Picking a version scheme that made that obvious would have been helpful.

~~~
yxhuvud
What? Ubuntu has a Year.month versioning scheme. Nothing like that seems to be
going on here.

~~~
chvid
Hah. Sorry that is correct. They do have the same LTS, update, update, LTS,
update, update thing going on as far as I can see.

------
scarface74
I thought the whole .Net Framework/.Net Core/.Net Standard distinction was
crazy. But the more I read about the Oracle JDK vs OpenJDK and the difference
in the support schedule and licensing, I find that Microsoft's strategy is
much more understandable.

And as far as the LTS version of Java, 3 years seems a little long to wait for
any updates but 6 months seems short to to drop support.

If I ever get back into Java, it will be solely for Android development. Does
any of this affect Android development?

I haven't used Java in years, is the Java ecosystem under Oracle as bad as it
appears from the outside?

~~~
Larrikin
The Android ecosystem is slowing down rapidly in new Java code and is moving
as fast as it can toward Kotlin.

~~~
pjmlp
Java on Android is like C on UNIX, it will only get away when Google decides
to reboot the OS.

Then we will see where Kotlin lands, specially since Fuchsia uses Dart.

~~~
anti_cf
I hope Fuchsia also supports Go, not as a replacement to Java, but as a first
class alternative.

~~~
pjmlp
Fuchsia's TCP/IP stack and file system utilities are currently written in Go.

------
Hallucinaut
Java users in the enterprise like myself in some of my client work won't be
massively enthralled by this approach, though not necessarily for good
reasons. Audit and compliance teams love to pick up on software versions not
on the latest version, so the idea of having a six month churn just means I
can see man-months of effort being plowed into no-op changes.

We're also unlikely to benefit since vendor software can't upgrade (or won't
certify new versions) and the mannequin developers consultancies place
offshore can barely work with Java 1.4 concepts. Best I can hope for is
improvements in GC and better defaults.

~~~
zaphirplane
Weird, why ? So long as the version is supported, compliance doesn’t raise the
issue. Of course plenty of compliance is done by recent graduates working for
big accounting firms

~~~
sk5t
Security updates to the JVM/JRE.

~~~
zaphirplane
The complaint was about the affect of major version release frequency.
Security fixs are done in bug fixes release

------
dep_b
Assigning variables through a switch-statement is really nice. Looks almost
exactly like Elixir does it.

~~~
bjz_
And many other languages before it - SML, OCaml, Haskell, Miranda, Erlang,
Scala, Rust...

------
raybb
Can anyone familiar with the Java ecosystem chime in here? Is this more of a
marketing ploy it are they actually releasing features at a significantly
faster rate?

~~~
bitmapbrother
New features are released every 6 months. Is there another extremely popular
language with a quicker release cadence?

~~~
sanxiyn
While Rust is not "extremely popular", Rust releases every _6 weeks_.

------
ppeetteerr
The use of `var` is a great improvement over the current method of declaring
variables. I love Swift for many reasons (optionals, structs/objs,
succinctness, no GC, etc.) and var-style declarations is one of them.

------
DeonPenny
Man at this point there is 0 reason not to use kotlin

~~~
chvid
I had to look twice at your statement.

At first I read it like: "Man at this point there is 0 reason to use kotlin".

But come to think about it, it makes just as much sense.

Perhaps you can explain why you think there is 0 reason not to use Kotlin now?

~~~
DeonPenny
Because a lot of these features are already implemented in kotlin. They are
written way more concisely with way less ceremony and boilerplate. Plus with
kotlins interop you can piecemeal your codebase away from legacy java no
matter the version. It's just a better language at this point

------
avodonosov
Project Loom isn't mentioned. So proper continuations aren't close?

------
sheeshkebab
Finally, multi line strings and inferred types. It only took 10 years.

Can’t wait what next 10 will bring - native json and html/jsx/xml perhaps?

~~~
forinti
I needed multiline strings in 1998.

