https://kotlinlang.org logo
Title
n

nimtiazm

04/15/2017, 8:57 AM
John Rose et al has announced recently that java will get fibers a.k.a coroutines ;)
d

defhlt

04/15/2017, 11:19 AM
do you have a link?
s

sreich

04/15/2017, 11:23 AM
Not very exciting, Java can get most of kotlin features and it still won't have them all, or the conciseness. Or most importantly, null safety
n

nimtiazm

04/15/2017, 2:49 PM
@defhlt Look for devoxx 2017 John Rose on YouTube
👍 1
@sreich yup that's correct. But legacy is a big and interesting factor. Plus performance is another factor that natural gives java some leverage.
s

sreich

04/15/2017, 2:51 PM
Performance of what gives Java leverage? Kotlin is more performant in many areas
n

nimtiazm

04/15/2017, 3:03 PM
If you run compute intensive routines like nbody and redux etc you'll see some margin
but Kotlin by far is way better than others on the jvm
s

sreich

04/15/2017, 3:06 PM
You've actually properly benchmarked this? I don't see how that could possibly be the case.. it's all JVM byte code, and kotlin has other nice things such as inline
n

nimtiazm

04/15/2017, 3:20 PM
Yes inline and string interpolation are really good in Kotlin but if you use a similarly tightly packed java code there'll be some margin there
s

sreich

04/15/2017, 3:34 PM
this sounds like some real hand waving. and you can do the same in kotlin..ergo java isn't "more optimized"
n

nimtiazm

04/15/2017, 3:45 PM
If you argue that way, then runtime intrinsics add a tiny cost too. Can't do anything about that. But that's not the whole point either.
Also don't forget every top level val and fun you add here and there will incur class loader cost. Roughly these factors add up to the margin I'm taking about. But I'm pretty confident that Kotlin compiler/runtime team will improve that further.
s

sreich

04/15/2017, 3:51 PM
this still sounds like you don't have any tangible benchmarks but are just making assumptions that one is measurably faster, honestly. and that's not what one should do when it comes to performance
n

nimtiazm

04/15/2017, 4:10 PM
I have published back my Kotlin ports yet. I have no idea when and where did you comprehend that I'm basing on assumption rather than findings. But that's fine. It's the internet after all.
i

Ian

04/16/2017, 3:37 AM
@nimtiazm I think his assumption was reasonable given that he already asked you if you have benchmarks and you ignored the question. If you have data to support your (unlikely) claim then please show it.
1
p

pniederw

04/17/2017, 8:40 PM
@nimtiazm that wasn’t an announcement at all, just one of many post-valhalla ideas
n

nimtiazm

04/18/2017, 4:48 AM
Of course Oracle’s safe-harbor statement says it can be all vaporware 🙂 . However, experience says whatever those engineers disclose to the public is whatever they’re working on. Yes it’s unclear if it’ll be java 10 or 11 or 12 but the kind of competition they’re getting from languages like Kotlin, they’ll do it sooner than later.
p

pniederw

04/18/2017, 4:50 AM
coroutines were categorically ruled out for java 10 by mark reinhold.
the talk you are referring to contains ideas for the next 10-20 years of the jvm. most of these things aren’t actively being worked on.
(in a product sense)
the most serious work on java coroutines I’m aware of to date is: http://ssw.jku.at/Research/Papers/Stadler11Master/Stadler11Master.pdf