seasonedcc / composable-functions

Types and functions to make composition easy and safe
MIT License
657 stars 13 forks source link

Extracting primitives inspired by ATMP #119

Closed diogob closed 10 months ago

diogob commented 11 months ago

The goal here is to have primitives that don't need parsers and yet compose and handle errors in a similar way as domain functions do.

Unfortunately this won't provide true type safety on compositions, since these composable primitives will work with any Composable function types.

However there are a few good use cases:

Inspired by the atmp library.

This PR is aiming at a "soft launch" where we can release a new version of the lib without breaking changes or any change in documentation.

TODO

diogob commented 10 months ago

I'm merging this one since it is backwards compatible and it seems that we are quite comfortable now with the direction it is taking. I'll hold the merge on the primitives type-safety for now. We also don't need to make any releases for now so we have some change to let ideas percolate with the current main branch code.