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 punning #359

Open
leque opened this issue Sep 22, 2022 · 0 comments
Open

record punning #359

leque opened this issue Sep 22, 2022 · 0 comments

Comments

@leque
Copy link
Contributor

leque commented Sep 22, 2022

I would like to be able to use so-called record punning found in Successor ML, OCaml, ECMAScript (Shorthand property names), ..., etc. also in SATySFi.

With this feature, we can construct a record

let f x y = (| x; y |)

instead of

let f x y = (| x = x; y = y |)

This can also be applied to record patterns (#358), so we can write

let f (| x; y |) = (x, y)

instead of

let f (| x = x; y = y |) = (x, y)
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