5 ms·
> there are many options for functional languages that compile to JS Arguably, depending on what you're building, the pain of integrating an entirely different
by RussianCow 3y ago
> there are many options for functional languages that compile to JS
Arguably, depending on what you're building, the pain of integrating an entirely different language into your stack is greater than the pain of simply using something like Ramda (or, better yet, just writing simple, imperative code). YMMV of course—if the problems you're solving lend themselves naturally to purely functional code, maybe something like Rescript or PureScript may be worth it, but for most projects, I'd guess probably not.
- scns 3y agoRescript compiles to really efficient JS. Learning React with ReasonML (Rescripts predecessor) spoiled me, in a bad way. Waiting for TS to compile was really painfull. In Reason it took fractions of a second.
- sprkv5 3y ago+1 the ReScript compiler is a beast: not only is it fast at generating JS, the JS it generates is optimised for performance[1]. If you are using React, it's better to go for ReScript rather than using Ramda or lodash-fp. 1. https://twitter.com/KrComet/status/1653351666446655488 https://twitter.com/KrComet/status/1653351666446655488
- nine_k 3y agoIntegrating a starkly different language has an upside: you have a clear separation line.