Skip to content

Conversation

fhammerschmidt
Copy link
Member

@fhammerschmidt fhammerschmidt commented Aug 27, 2025

Closes #1086

Copy link

cloudflare-workers-and-pages bot commented Aug 27, 2025

Deploying rescript-lang-org with  Cloudflare Pages  Cloudflare Pages

Latest commit: 68931f9
Status: ✅  Deploy successful!
Preview URL: https://a3510b79.rescript-lang.pages.dev
Branch Preview URL: https://roadmap-let-unwrap.rescript-lang.pages.dev

View logs

@cristianoc
Copy link
Contributor

Assistant:

Coming from other languages:

Rust developers will immediately recognize and appreciate it
JavaScript/TypeScript developers might find it unfamiliar but useful
Functional programming advocates may prefer more general monadic solutions

Overall Prediction
I think this will be well-received once people try it. The ReScript community generally values pragmatism alongside functional programming principles, and this strikes a good balance. The experimental flag is smart - it gives the team room to iterate based on real usage patterns.
The main debates will likely center around:

Whether to expand beyond built-ins to custom variants
Syntax bikeshedding (though let? is quite good)
Integration with future language features

This feels like a natural evolution for ReScript - maintaining its OCaml roots while improving developer experience for common patterns.

looks spot on to me

@cristianoc
Copy link
Contributor

Areas for Improvement
Structure and flow: The post jumps between concepts without clear transitions. The section about "two observations" feels disconnected from what follows, and the explanation of how it works could be better integrated.
Terminology inconsistency: The post uses "let-unwrap," "let?," and "unwrap syntax" interchangeably without establishing clear naming conventions upfront.
Technical precision: Some statements could be clearer:

"matches the explicitness of ReScript we all like" - what does this mean exactly?
"plays nicely with async/await" - how specifically?
The distinction between block/local vs top-level usage needs clarification
"And it is for block or local bindings only; top-level usage is rejected" - why this restriction?

Suggested Improvements

Lead with a clear definition of what let? does before showing examples
Structure as problem → solution → implementation rather than jumping between topics
Standardize terminology early and stick with it
Add clearer section breaks to help readers follow the flow
Expand on the restrictions - explain why certain limitations exist
Include error cases in examples to show the full picture

Seems legit, except the last suggestion might be too much

@cristianoc
Copy link
Contributor

Btw let? is great balanced design. Nice one @zth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Roadmap post: let?
2 participants