Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

Proposing new syntax for zero-cost unwrapping options/results

$
0
0

Not using a question mark would remove a valid syntax I use in tests where I’m sure of the shape I expect.

The let? syntax is not perfect, but I still prefer it over the other syntaxes that were suggested.

Regarding the benefit of it, I agree with you, we have to be careful about its usage and keep it in limited locations where you combine multiple complex data flows. In OCaml, the pervasive use of let* in some code bases definitely hurt readability and ease of maintenance by focusing way too much on the happy path.


Viewing all articles
Browse latest Browse all 2592

Trending Articles