tazjin/yants

Open structs and intersection types

Ptival opened this issue · 1 comments

The current struct system checks for both the presence of mandatory fields, and the absence of extraneous fields.

There is some granularity offered in having optional fields, but it is sometimes useful to have more fine-grained control, such as:

Open structures
Where mandatory fields are checked for presence, but extraneous fields are fine.

Intersection types
In the presence of open structures, it starts making sense to ask for a value to have several types at once.

This could be quite a bit of work, so I understand if it takes a while to think through and decide whether to add them!

The source of this project has moved to git.tazj.in and I have moved this issue to the mailing list for my projects (depot@tazj.in).