Yeah, and we’re somewhat close in the sense that we also primarily recommend switches and pattern matching. But, one of ReScript’s goals is to be familiar to JS devs, and if’s and ternaries are widely used there. Both have their place in ReScript, but there’s no denying that the switch is one of the most powerful things we have.
Yup, quite close! It’s similar to OCaml’s letop. But, both of those rely on callbacks. let? uses no callbacks, it all gets compiled to nice, optimization friendly JS with very little “fat”, as shown in the original post. That’s important to us.
Of course, thanks for posting them! And keep them coming. As we’ve said before, it’s important to exhaust all ideas to make sure we make a well thought through trade off in what path we choose.