Preferences

I want that stabilized so bad but it's not been really moving forward.

I was not a fan when I first saw it but I'm becoming desperate to have it the more Rust I write.
#![feature(try_blocks)]

You only live once.

I've tried it recently, from memory error inference wasn't that great through it.
That's exactly what's currently being fixed before stabilizing it.
Out of curiosity why can’t a block just do this natively?
Because it would massively alter langage semantics? It converts returns from the nearest function into returns from the nearest (try) block.
Because then you couldn't use ? to propagate errors if they occurred inside any loops or branches within the function, which would be a significant limitation.

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal