There was a paper by Odersky a few years ago about continuations being supported in Scala. And I also see that they were supported in Scala 2.11 via a compiler plugin. However, it seems, I fear, that nobody is maintaining this.

Is this something anyone has considered for Scala 2.12 and higher?

BTW I have until now not been able to get continuations to work even in 2.11. There is a stackoverflow page about how to try to make them work, but it contains several contradictory pieces of advise.

In my outlier opinion, support for continuations would make the Scala language more accessible to people coming from Lisp and Scheme.

The continuations plugin was indeed discontinued because nobody was volunteering to maintain it. If people feel differently now, and have time to spend, it would be nice to restart the effort. But it will be a lot of work.

AFAIU, I think it will be possible to do tail call optimization in terms of the bytecode

As adding the ability to manipulate call stacks to the JVM will undoubtedly be required, it is also the goal of this project to add an even lighter-weight construct that will allow unwinding the stack to some point and then invoke a method with given arguments (basically, a generalization of efficient tail-calls). We will call that feature unwind-and-invoke , or UAI. It is not the goal of this project to add an automatic tail-call optimization to the JVM.

but I think the scala compiler will still need to support this. It could implement tail call optimization (TCO) in terms of unwind-and-invoke (UAI). But yeah I’m no expert on the subject, that was just my impression.