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

Merge operator #74

Closed
yannham opened this issue May 4, 2020 · 2 comments
Closed

Merge operator #74

yannham opened this issue May 4, 2020 · 2 comments

Comments

@yannham
Copy link
Member

yannham commented May 4, 2020

Is your feature request related to a problem? Please describe.
In a configuration-oriented language, several fundamental operations may be elegantly subsumed by the use of a merge operator à la Cue: define both data and schemas in the same language, validate data against schemas, set default values and more generally have a form of inheritance for better code reuse.

Describe the solution you'd like
Enrich the language along two axis:

  • Add the following new kind of values that will have a specific semantics with respect to merge, and can be converted to standard values for any operation
    • Default values
    • Types/Contracts
    • Docstrings
  • Add a merge - or a meet - operator to combine records

Additional context
This takes inspiration from the CUE programming language where types and values live in the same space, namely a bounded lattice (example of merging in CUE). Nickel allows more things (e.g general recursion and arbitrary terms as contracts) thus cannot have the same kind of strong properties, but we aim to still retain the spirit and the niceness of the feature.

@aspiwack
Copy link
Member

What's missing for this to be closed?

@yannham
Copy link
Member Author

yannham commented Jul 22, 2020

Closed by #79.

@yannham yannham closed this as completed Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants