logoalt Hacker News

newpavlovyesterday at 3:38 PM1 replyview on HN

I agree. But it should be done with a proper effect system, not a pile of ad hoc hacks built on abuse of the type system.


Replies

echelonyesterday at 6:17 PM

`async` is in the type system. In your mind, how would you mark and bubble up panicky functions, etc.? What would that look like?

I felt like a `panic` label for functions would be nice, but if we start stacking labels it becomes cumbersome:

  pub async panic alloc fn foo() {}
That feels dense.

I think ideally it would be something readers could spot at first glance, not something inferred.

show 1 reply