i’ve been around and used rescript for 2 years now, actually more than 2 years. i love it. i also dislike typescript, i actually never really though typescript was a very good idea and i’ve sort of been proven to be rigth, because the type system is so bad it has to be repeatedly monkey-patched to handle an infinite number of scenarios, make it terribly slow.
anyway, what frustrates me with rescript is that it never feels complete. it’s like an inverted-warts situation where so many features are missing. i don’t have guard statements forcing me to branch everything. ok, fine, i can do that (but it absolutely worsens readability, but whatever, i can work around it). then we have loops, where there are no break statements. so for a tokenizer, for example, you first have to peek as the loop condition, and then assign inside the loop and actually eat the token. this is getting problematic.
and of course i can have a mutable variable outside the loop, but then i have to do a while condition, eat the token from the tokenizer (or data chunk from whatever reader), update the condition and so on. and for that i have to alloc with ref() for no real reason.
so there’s no if-let, while-let, no return and no break. whoever says this is not a problem is just plain-out wrong. the language feels gimped and incomplete, despite being oh-so-beautiful (especially now with 12 where we can finally stop saying *. /. +. -. and so on). i love you guys, i love your work, but good lord can we just sprinkle a few of these very reasonable features for those of us wanting to get work done in this fantastic language?
share your thoughts.