First impression of ReasonML + React after the workshop:
+ Loved the type checking
+ Syntax is pretty natural (mostly... ## is weird)
+ Pattern matching is nice
- Cryptic error messages
- Annoying having to constantly cast types with ReasonReact
Conversation
What casting were you running into?
2
Also super interested to hear you elaborate on your experience of the type system. Both the good and the bad. 😃
1
I liked how we knew the code was valid before running it, felt like it really helped us learn the syntax quickly. Problem was, when the code was invalid, the error message often didn't give us much guidance on what we should be doing differently.
1
1
Yeah, from what I've seen, the Reason errors seem to be formatted quite nicely, but could have better semantic guidance. This is a harder problem and takes time and effort to improve.
1
There's also an interesting problem of sometimes you want different errors as a beginner not understanding, vs an expert using the errors as a todo list in the middle of a refactor. But for now I'd be optimising for the beginner. 🙂
Eg. Rust's errors come with an error code that you can feed back into the compiler with `rustc --explain` to get a more detailed tutorial-style explanation. Not the most ideal UX tbh (breaks flow and is not tailored to context), but I've heard beginners really sing its praises!
1

