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

Constrained primitive types #38

Open
JohannesMeierSE opened this issue Nov 20, 2024 · 0 comments
Open

Constrained primitive types #38

JohannesMeierSE opened this issue Nov 20, 2024 · 0 comments
Labels
New Feature New feature or request Predefined Types
Milestone

Comments

@JohannesMeierSE
Copy link
Collaborator

JohannesMeierSE commented Nov 20, 2024

Examples are:

  • strings with restricted length, regular expressions (type inference for concatenation of restricted strings)
  • min/max / ranges for numbers (type inference for addition of ranges: <range> + <range>)
  • physical units

Requirements:

  • Assignability/sub-type rules depend on the current DSL!
  • Provide general mechanism / API for "arbitrary" constrainted primitives
  • Maybe provide some defaults?
  • Maybe support additional properties (not generics Generics #26!) for types, which are not relevant for assignability/validation, but for code generation, e.g. UTF-8 encoding for strings?
  • Default behaviour of new parameters is empty, add more behaviour if required by explicit API calls for e.g. assignability, inference
  • Maybe these issues target not only primitive types, but any kinds of types?
@JohannesMeierSE JohannesMeierSE added this to the Backlog milestone Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Feature New feature or request Predefined Types
Projects
None yet
Development

No branches or pull requests

1 participant