2 ms·
Just use a library that already contains this and more functional programming idioms, like fp-ts or its successor, Effect [0]. It is a little more complex to le
by satvikpendem 3y ago
Just use a library that already contains this and more functional programming idioms, like fp-ts or its successor, Effect [0]. It is a little more complex to learn but much more robust that simply implementing your own Result and other types.
[0] https://www.effect.website/ https://www.effect.website/
- Nezteb 3y agoA great introduction video on Effect: https://www.youtube.com/watch?v=SloZE4i4Zfk https://www.youtube.com/watch?v=SloZE4i4Zfk
- tentacleuno 3y agoEffect looks great. Strangely enough, I recall dreaming of it and recoiling at how much of a good idea it is -- can't wait to give it a proper go in a project.
- chrisweekly 3y ago"recoiling at how much of a good idea it is" "recoiling" implies a negative response, ie revulsion or fear
- tentacleuno 3y agoAhh, most likely meant to say recalling then.