For your consideration on exposing continuations as API
Pedro Lamarão
pedro.lamarao at prodist.com.br
Thu Nov 12 14:51:54 UTC 2020
Em qui., 12 de nov. de 2020 às 06:10, Alan Bateman <Alan.Bateman at oracle.com>
escreveu:
> I think you are asking for generators which are indeed easy to do with
> continuations. I think there are others on this mailing list that have
> been experimenting with them too. There isn't any concrete proposals for
> generators right now but it an area to explore further (so having
> examples like your parser is good).
>
True. After reading this, I attempted to hide continuations inside a
utility class, and it seems very appropriate. In retrospect, I think the
concept of a generator escaped me because every discussion on generators
I've seen is all about infinite sequences computed by pure functions.
This is what I came up with:
https://github.com/pedrolamarao/loom/blob/main/ber/src/main/java/loom/Generator.java
It would be very helpful if some means for further research would be
arranged. If I understand correctly, it will soon become impossible to try
stuff like this from the outside.
Atte.
Pedro.
More information about the loom-dev
mailing list