Earlier quoted context omitted.
Speaking as a dev who started with Java 1.2, I actually much prefer to write code that doesn’t rely on magic unseen effects. The only exception to this is dependency injection via annotations but for god’s sake use it in moderation. But then I still prefer to write for loops rather than streams because I know what the jit compiler is doing.
Unless you're writing assembly or maybe C then "magic" is happening
Why Continuations Are Coming to Java
21–30 of 185 posts
Re: Why Continuations Are Coming to Java
#22I find it amusing that whenever people talk about Java, they're somehow using magic to describe it. It's like Java programmers see themselves as magicians... This is especially widespread with spring boot. I've even read sentences like "It's hard to say what it does, you can only see it's effects!"
https://www.reddit.com/r/java/comments/7ulmwn/coroutines_in_...
It's quite possible to make non-magical coroutines in Java. It's about how you document them (and perhaps how you try to hide implementation details).
Re: Why Continuations Are Coming to Java
#23What is called continuations in Java is available as "coroutines" in Kotlin, today. Both terms means more or less the same, from a programmers point of view, actually Continuations are part of Kotlins coroutines. https://kotlinlang.org/docs/reference/coroutines-overview.ht...
Is there some special jvm/dalvik support for it?
Re: Why Continuations Are Coming to Java
#24What is called continuations in Java is available as "coroutines" in Kotlin, today. Both terms means more or less the same, from a programmers point of view, actually Continuations are part of Kotlins coroutines. https://kotlinlang.org/docs/reference/coroutines-overview.ht...
Is there some special jvm/dalvik support for it?
Re: Why Continuations Are Coming to Java
#25I find it amusing that whenever people talk about Java, they're somehow using magic to describe it. It's like Java programmers see themselves as magicians... This is especially widespread with spring boot. I've even read sentences like "It's hard to say what it does, you can only see it's effects!"
I wonder if it's because there is such a sharp line between what a Java programmer can do in Java, and what the JVM does to make that possible. Much of what the JVM does is impossible to even describe in normal Java. That line doesn't exist in, say, C++, where the compiler is just another C++ program. With the caveat that there are JVMs written in Java, so that line can be crossed: https://www.jikesrvm.org/ The same…
Re: Why Continuations Are Coming to Java
#26Re: Why Continuations Are Coming to Java
#27> However, actually, Project Loom, the goal of the project is to add continuations, fibers, and tail call elimination.
I'm guessing that the project is called either Loom or Loon (and i believe it's the former), but i like the idea that there are actually two cooperating projects, each of which occasionally suspends and lets the other run.
Re: Why Continuations Are Coming to Java
#28Re: Why Continuations Are Coming to Java
#29Earlier quoted context omitted.
I vaguely seem to recall that Rhino, Cocoon's pre-Node serverside javascript, had continuations too. That much have been around 2006 or thereabouts.
I remember them too. I had to dig a little to find the links I remember from the past. http://web.archive.org/web/20190127111220/https://wiki.apach... From the Rhino Google group, it looks like some people are still using continuations in Rhino: https://groups.google.com/forum/#!topic/mozilla-rhino/Gfo-dO... https://github.com/szegedi/spring-web-jsflow
Re: Why Continuations Are Coming to Java
#30How does this differ from scheme-style continuations? IIRC, full continuations in the scheme sense of the term are currently impossible in Java as they require forbidden stack manipulation. Or is what's being proposed here something entirely else?