Skip to content

Conversation

jpsamaroo
Copy link
Member

This PR brings Dagger.@spawn closer to Threads.@spawn by allowing an alternative parsing mode when begin ... end blocks are encountered; specifically, such blocks are treated as a function without any arguments, which closes over any captured values.

Todo:

  • Detect closed-over variables (if possible) and pass them as arguments, in case they're thunks/chunks
  • (Alternative) Recurse into closure at runtime to find thunks/chunks and replace them during move
  • (Optional) Implement recursive parsing mode
  • Add tests
  • Add docs

Fixes #421

Add closure mode
Use closure mode for `begin ... end` expressions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dagger's syntax when calling functions with kwards does not match Julia syntax
1 participant