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

Record types #245

Open
andrewbaxter opened this issue Mar 6, 2024 · 0 comments
Open

Record types #245

andrewbaxter opened this issue Mar 6, 2024 · 0 comments

Comments

@andrewbaxter
Copy link

Using tuples everywhere relies on positioning to correlate symbols which is risky (mix up the order of two symbols and you can end up with strange results).

Relations kind of support a record syntax, but this isn't supported anywhere else.

I'd like:

  • Record rules, like ?{something: a, something_else: b} := .... (Also this would solve the issue that right now there's no way to rename results other than writing a new rule that just forwards the elements with a new name, which is excessive and makes queries more fragile)
  • Record matching for non-relations, like := my_rule{a: a, b: b}

I assume the framework for this is already there, since results already have headers etc.

And maybe

  • Record values, like y = {a: 4, b: something}
  • Record methods, like get(y, "a")
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

1 participant