<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"></div><div dir="ltr">I’ve previously proven you don’t need coroutines to implement generators. </div><div dir="ltr"><br></div><div dir="ltr">Code is here <a href="https://github.com/robaho/generators">https://github.com/robaho/generators</a></div><div dir="ltr"><br></div><div dir="ltr">As for other worthwhile CPS usages I guess you’d have to show me because I doubt it. </div><div dir="ltr"><br><blockquote type="cite">On Jul 14, 2025, at 5:15 AM, Andrew Haley <aph-open@littlepinkcloud.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><span>On 13/07/2025 21:34, Robert Engels wrote:</span><br><blockquote type="cite"><span>The whole point of virtual threads is to avoid coroutines / async functions.</span><br></blockquote><span></span><br><span>I'm not sure that's really true. Continuation-passing style and coroutines have their uses even in the presence of virtual threads, as do things like generators. I don't much like coloured functions (does anyone?) but CPS is more general than vthreads.</span><br><span></span><br><span>-- </span><br><span>Andrew Haley  (he/him)</span><br><span>Java Platform Lead Engineer</span><br><span>https://keybase.io/andrewhaley</span><br><span>EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671</span><br><span></span><br></div></blockquote></body></html>