4 ms·
JavaScript does not make it easy. I'm having the same issue as I move towards more functional code in a large React codebase. I'm wanting to adopt more of the
by bcheung 7y ago
JavaScript does not make it easy. I'm having the same issue as I move towards more functional code in a large React codebase. I'm wanting to adopt more of these patterns but the JS language makes it difficult.
Specifically, JavaScript's lack of infix operators, pattern matching, type classes, and `do` notation make the code harder to read.
- toastal 7y agoAre you required to use JavaScript? Because Reason and PureScript can both hook into React without much trouble and give you the features you want.
- bcheung 7y agoI'm evaluating Purescript now. I have concerns about developer ramp up time but other than that I like it. Reason is more popular but it lacks the category theory centric rigor. The syntax also is not as nice as the Haskell style. I'd rather go with something that fits the FP model better than syntax that is more familiar.