# Java is catching up

**URL:** <https://discuss.kotlinlang.org/t/java-is-catching-up/10033>\
**Category:** Uncategorized\
**Created:** [October 26, 2018, 1:57pm UTC](https://discuss.kotlinlang.org/t/java-is-catching-up/10033 "2018-10-26T13:57:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![medium](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/medium/32/10404_2.png) [@medium](https://discuss.kotlinlang.org/u/medium)\
**Post date:** [October 26, 2018, 1:57pm UTC](https://discuss.kotlinlang.org/t/java-is-catching-up/10033/1 "2018-10-26T13:57:46Z")

</div>

Some features that I presented in previous “Kotlin pitches” are already in Java or are coming soon.

Already in Java:

- local type inference
- jshell (REPL) better than Kotlins buggy REPL

Coming soon:

- raw strings
- more powerful `switch`, similar to Kotlins `when`
- pattern matching even better than what `when` in Kotlin allows
- `records` (data classes)
- continuations and fibers (similar to coroutines)
- smart casts

See [talk by Marc Reinhold](https://www.youtube.com/watch?v=nKJbDYRsO0s&feature=youtu.be&t=3372).

There is a lot more to like in Kotlin that will not so soon (or never) be found in Java, but at least the sales pitch will become harder in the future. Personally I think Oracle should just adopt Kotlin, join the Kotlin Foundation, and deprecate Java as a language 😉

---

<div class="post-metadata">

**Author:** ![arocnies](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/arocnies/32/5143_2.png) [@arocnies](https://discuss.kotlinlang.org/u/arocnies)\
**Post date:** [October 26, 2018, 2:34pm UTC](https://discuss.kotlinlang.org/t/java-is-catching-up/10033/2 "2018-10-26T14:34:55Z")

</div>

Glad to see Java is planning on adding some of the features from Kotlin. Interop with Java and new JVM features will improve Kotlin and the other JVM languages.

Kotlin will especially benefit since it’s built to be completely interoperable with Java.

---

<div class="post-metadata">

**Author:** ![roryaburks](https://avatars.discourse-cdn.com/v4/letter/r/67e7ee/32.png) [@roryaburks](https://discuss.kotlinlang.org/u/roryaburks)\
**Post date:** [October 26, 2018, 4:57pm UTC](https://discuss.kotlinlang.org/t/java-is-catching-up/10033/3 "2018-10-26T16:57:22Z")

</div>

> [@medium](#):
>
> more powerful `switch` , similar to Kotlins `when`

Every language needs this. Using a switch statement in C# after getting familiar with `when` is tragic. In C[++] I get it; they’re mirroring low-level jump gate logic. But you can’t even fall-through in C#, so all you really have is an excessively awkward code block. Oh, but this is a Kotlin board so I should stop there.

---

<div class="post-metadata">

**Author:** ![tieskedh](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/tieskedh/32/2816_2.png) [@tieskedh](https://discuss.kotlinlang.org/u/tieskedh)\
**Post date:** [October 26, 2018, 7:28pm UTC](https://discuss.kotlinlang.org/t/java-is-catching-up/10033/4 "2018-10-26T19:28:54Z")

</div>

I’m looking forwart to their destruction patterns.  
Kotlin would be more verbose and more difficult to read than Java (unless kotlin would add them too 🙂

---

<div class="post-metadata">

**Author:** ![fvasco](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/fvasco/32/1961_2.png) [@fvasco](https://discuss.kotlinlang.org/u/fvasco)\
**Post date:** [October 27, 2018, 5:58am UTC](https://discuss.kotlinlang.org/t/java-is-catching-up/10033/5 "2018-10-27T05:58:16Z")

</div>

> [@arocnies](#):
>
> Glad to see Java is planning on adding some of the features from Kotlin

Glad to see Java is planning on adding some of the features from a ton of other languages, which Kotlin copied.

Java evolves with its time ant with its style, I don’t see any relevant Kotlin’s contribution on it.

If Java developers are happy with it (and Java is widely used), I don’t find any valid reason to deprecate the language.  
Moreover if Java stops to evolve for a Oracle’s imposition (and this can be a good news for many Java developers), I don’t consider this a “Kotlin success story”.
