DEV Community

Discussion on: What is Reason?

Collapse
 
sophiabrandt profile image
Sophia Brandt

Thanks for sharing your thoughts, Seth!
How do you find interop with JavaScript libraries?
As someone with zero knowledge of typed languages, I find it hard to understand how to interact with JS, especially if there aren't existing bucklescript bindings.
How are your experiences?

Collapse
 
darthknoppix profile image
Seth Corker • Edited

Interoperability can be very challenging depending on the how dynamic the target API is. It’s common to write functions in JS that accept an array or a single value, null or undefined which complicate interop.

What I like about Reason is that there are layers of interop, the one I showed is the most crude. It’s useful for getting something done quickly. The second level is actually writing bindings.

One huge help I would say is if the target JS library is actually written with TypeScript or flow already, it makes it much easier to write bindings or even make a binding which is more functional than the original.