How Not to Introduce ReasonReact to Your Project

Well, actually the reality is not as harsh as the clickbaitey title would make you think. Nothing particularly wrong came out of my introduction of ReasonReact and, by extension, ReasonML to the static build of this very site. The claim that you can introduce Reason & ReasonReact to an existing application one component at a time is entirely true.

Pipes are Fast but We Are Faster

Oy vey. It’s bad enough that the ReasonML standard library, Belt’s preference for fast pipes is polarizing the community (regular pipes are way more customary in Caml, and of course ReasonML attracts a lot of Caml enthusiasts), now I learn it’s not even the same fast pipe!

Tail-optimized functions in ReasonML

For that mechanism to work, you have to be sure you don’t do anything with the result of the recursive call other than return it as is. That way, you don’t have to return at all. The function instance that is called last evaluates the final result and returns it straight to the original callee.

TIL: Why ReasonML Has No Nullary Functions

“If you don’t provide all of a function’s parameters, you get a new function from the remaining parameters to the result. As a consequence, if you could actually provide no parameters at all, then func() would be the same as func and neither would actually call func.”