Hacker News new | past | comments | ask | show | jobs | submit login

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/




A great introduction video on Effect: https://www.youtube.com/watch?v=SloZE4i4Zfk


Effect 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.


"recoiling at how much of a good idea it is"

"recoiling" implies a negative response, ie revulsion or fear


Ahh, most likely meant to say recalling then.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: