
Java 8 vs. Java 9 - nataliiabubniuk
https://www.romexsoft.com/blog/java-8-vs-java-9/
======
pawadu
I love Java. I think it has changed the world for the better.

That being said, I just can't get excited about new language features now that
I have discovered Kotlin. It is essentially Java but with a much smarter
compiler and a more modern and sane syntax.

~~~
forinti
I used to like Java when it was simpler. Generics I thought were great, but
the new features just seem like attempts to shoehorn features of dynamic
languages onto a business language. And I still can't have multiline strings
(on a language used for Web programming!).

~~~
jitix
The multi line issue pisses me off on a daily basis, esp when writing tests
that deal with JSONs. It's so much readable with multi line strings in python
and groovy.

I usually use groovy for my fun/toy projects but at my day job writing
enterprise code the tests have huge JSON building blocks before the actual
assertion happens.

~~~
vonmoltke
Why not embed the JSON as a file in the test resources and read it in during
the test setup? Is there a particular reason it needs to be embedded in the
source code of the test?

~~~
jitix
Its to maintain context. If a developer is looking at a large test code then
it becomes difficult to switch back and forth between 10s of JSON files and
the main test code. Having the input, output and the test data in the same
file is much more convenient.

------
geodel
JEP 110: HTTP/2 Client

* The API and implementation will not be part of Java SE.

* The API will live under the jdk.incubtor namespace.

* The module will not resolve by default at compile or run time.

Modular source code is internal reorganization of JDK. Hopefully it will not
affect Java developers negatively.

Process API: It can provide PIDs finally. Seems like big feature for Java 9.

JShell: May find some use. Not sure how many Java developer care about it.

~~~
specialist
re JShell. nodejs has raised my awareness of the joys of shell scripting. So
something like this would be cool:

    
    
      #!/usr/bin/env java
    

For my own projects, I foresee replacing all those goofy build tools with
straight Java. Less impedance mismatch.

~~~
cel1ne
Check out kotlin-script [https://github.com/andrewoma/kotlin-
script](https://github.com/andrewoma/kotlin-script)

------
jankotek
It does not mention internals, changes in Unsafe or concurrency are pretty big
deal

------
melling
"Modular code"

I thought Jigsaw was rejected.

~~~
stevehiehn
I think it just keep causing delays due to complexity.

~~~
melling
It was started 10 years ago.

------
stevehiehn
Nice summary. I'm pretty sure there is a new default GC as well.

~~~
walkingolof
No new GC but Java 9 makes the G1 collector the default GC

~~~
stevehiehn
Ah, thanks for the clarification!

------
jffry
Site appears to be down, here's an archive/mirror:
[https://archive.is/6tger](https://archive.is/6tger)

------
bballer
I can't connect to the site... HN hug of death?

~~~
nataliiabubniuk
Works already. Fallen due to huge traffic.

------
mapcars
WoW, it's 2017 and Java finally gets a REPL and it's only 30 years behind the
market. Congratulations!

~~~
pjmlp
Java already had REPLs in the form of Beanshell, Groovy and Eclipse
scratchpad.

It's 2017, where are the REPLs for Go and Rust?

~~~
kasey_junk
I used a REPL in Java right around when they did the name change to J2SE, so
that must have been 20 years ago? By the OPs definition it was still 10 years
too late though so there is that.

~~~
pjmlp
Do you remember the name?

I know Java since the early releases and the only thing that comes to mind is
Beanshell, which was around that time.

~~~
kasey_junk
It was some third party thing I found on FTP servers at the time. It might
have been Beanshell but I can't really recall.

~~~
pjmlp
Ah ok, thanks for the info.

~~~
argonium
I wrote this one a while ago -
[https://github.com/argonium/jsnip](https://github.com/argonium/jsnip). May be
helpful.

------
TeMPOraL
Nitpick, but God, I hate this hero image. It's "fantasy UI" is so lazily done
it hurts the eyes. It's just the same block copy-pasted around and resized
multiple times. Did whoever made this picture think nobody would notice?

(Yes, I hate half-assed design.)

~~~
jakub_g
Also they use contrast ratio of 3.0 for main text (gray font on white
background). WCAG minimum is 4.5 and recommended is 7.0.

------
Asooka
Okay, this is completely tangential to the article, but I see this footer on
the website:

"We are using cookies to improve your experience of our site. By clicking
‘Agree’ or _ignoring the banner_ , you are assenting to our use of cookies."

I don't really care, but is this strictly speaking legal? "If you don't read
this, you agree to it"? If I read it, am I "ignoring the banner"? Usually if
you don't agree, they are supposed to not store cookies and ask every time,
which is something I'm actually OK with.

------
Entangled
Boring.

I'll tell you a little secret, Java is the number one programming language in
the world just because it is used by millions of programmers for Android apps
and a few enslaved programmers in corporate gulags. Once Kotlin takes the
Android world by storm Java will sit next to Cobol in the history books of
technology.

~~~
geodel
At one point Scala was going to take over the world. It was hot favorite of
many fastest growing companies. Then the companies grew and moved to Java with
or without much fuss.

Your secret does seem like secret to lot of people. In my knowledge Java is
big because lots and lots of companies use Java stack for boring enterprise
applications. And in those places people could care less about cool stuff and
work on things that pays.

Cobol is still used in very critical software at big Banks. Java along with it
quite respectful place. Whereas Kotlin is a little bit of lot of things. Runs
of JS/JVM/Native but none of them a unique strength for Kotlin. So it will be
very difficult to compete with languages which committed to single platform
and have serious business use cases.

~~~
cel1ne
One of Kotlin's design goals was 100% compatibility with java.

Whenever I work on a java-codebase and see a class that could be expressed
much simpler in Kotlin I press "Cmd+Option+Shift+K".

Intellij IDEA automatically converts this file to Kotlin. The codebase
continues to work without issues and I can proceed extending this part in
Kotlin.

