Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
gpderetta
on July 18, 2023
|
parent
|
context
|
favorite
| on:
Coroutines for Go
Sure, as long as I can close over a yield object. There is no reason for filter and map to know that the last function parameter takes a continuation.
uhura
on July 18, 2023
[–]
But then, how could you guarantee type safety?
This yield is not an object, it is handling the execution context to another stack.
gpderetta
on July 18, 2023
|
parent
[–]
It is a delimited one-shot continuation. Delimited continuations are first class objects like any other and it should be possible to close over them.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: