Remix.run Logo
stouset 2 days ago

Out of curiosity why can’t a block just do this natively?

masklinn 2 days ago | parent | next [-]

Because it would massively alter langage semantics? It converts returns from the nearest function into returns from the nearest (try) block.

lunar_mycroft 2 days ago | parent | prev [-]

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.