this post was submitted on 20 Aug 2025
8 points (100.0% liked)

ReScript

73 readers
1 users here now

A community for the rescript programming language. https://rescript-lang.org/

founded 2 years ago
MODERATORS
 

Proposing let? as a new syntax with zero‑runtime. An alternative to nested switches or Option.flatMap chains. It unwraps Ok/Some values and early‑returns on Error/None, and works seamlessly with async/await.

let? Ok(user) = await fetchUser(id)

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here