Formal API for creating new ADTs
Open
- Dominant language
- JavaScript
- Stars
- 1.6k
- Forks
- 103
- PR merge metrics
- No merged PRs in 30d
Description
First of all, impressive library! Really fun to work with.
I'd like to suggest making defineUnion part of the library's API. While there are other libraries that are specifically dedicated to creating new ADTs, the APIs you end up are quite different, which leads to inconsistencies in the code base. Some types are using one form of pattern matching, others use a different API.
What's missing (IMHO):
* Exporting defineUnion functionality
* Support for (de)serialising ADTs
I'm willing to provide a PR if the concept is deemed worthy.
Contributor guide
Assessment
This issue has not been assessed yet.