Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Coeffects: Context-Aware Programming Languages (tomasp.net)
3 points by dustingetz 4 months ago | hide | past | favorite | 1 comment


This is great. I see immediate use in better Async/Await ergonomics. Zig was making rounds recently for their new async semantics [1], in which functions with an element of concurrency request a reference to a concurrent executor (the IO interface). The advantage is that you can drop the red/blue syntax. Plus, you can load your IO interface as a global const and reference it from anywhere without passing around a variable everywhere.

I see context variables as a step up from that. You can specify a dependency on some concurrent runtime environment (?async) and run with that.

[1] https://kristoff.it/blog/zig-new-async-io/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: