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

Rescript frustration

$
0
0

experimenting for a bit and the only conclusion i can sort of draw in the end is that exceptions are interesting ONLY because I cant do early returns. i dont understand why you’re saying the compiler cant be as helpful with early returns. if you do early returns with e.g. the ? operator, you’re moving exhaustiveness checks to the caller. if you dont want to do that, you can still switch.

also since we don’t even have early returns, i can only do certain loops as recursion anyways, so i might as well recurse on results. i hate to say it but i feel rescript has picked the “worst of both worlds” approach here. :<


Viewing all articles
Browse latest Browse all 2592

Trending Articles