Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look into self-referential type kinds #36

Open
TheNeikos opened this issue Sep 16, 2022 · 0 comments
Open

Look into self-referential type kinds #36

TheNeikos opened this issue Sep 16, 2022 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@TheNeikos
Copy link
Owner

Currently TypeDescriptions can only be forward declaring: "I am an array consisting of Strings".

An interesting feature could be to extend this vocabulary with indirect references. These would allow a more structure approach to declare dependencies between fields:

"I am an array consisting of strings found in this other array."

Some inspiration can be: https://www.typescriptlang.org/docs/handbook/2/keyof-types.html

The important part here is, this is not programming or otherwise behavioural checks. This is a structural type description.

Some possible operators:

  • keyOf, checks whether the given HashMap/Struct contains the given Type as key
  • memberOf, checks whether the given Array contains the given Type as a member

Others could be considered.

@TheNeikos TheNeikos added needs-review help wanted Extra attention is needed and removed needs-review labels Sep 16, 2022
@TheNeikos TheNeikos added this to the Release v0.3.0 milestone Sep 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant