Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
_alphageek
· 6mo ago · 0 comments
The duplicate-state collapse (hoisting the match out of the await branches like in his process_command example) is the single easiest pattern anyone can apply to existing async code today. No compiler work needed, just a refactor.
Comments
[–]
zozbot234
6mo ago
At the very least, you'd want to have a custom lint that can surface the places where it's applicable. That's pretty close to compiler work.