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

feature: record syntax ideas / scopedlabels #19

Open
mhuesch opened this issue Apr 13, 2021 · 0 comments
Open

feature: record syntax ideas / scopedlabels #19

mhuesch opened this issue Apr 13, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@mhuesch
Copy link
Contributor

mhuesch commented Apr 13, 2021

extensible records would be 🔥

we currently have product types, with Pair (2-tuples).

the approach outlined in this paper might lead to a nice mapping between underlying Rust structs (other data in Holochain) and types in the poly-rs language.

a possible sketch.
. would be a the field accessor syntax, in keeping with Lisp-y style.

((lam [r]
    (. r field_x))
 {[field_x 1]
  [field_y 2]
  opt_expr_for_record_to_extend})

misc related-ish links

https://gist.github.com/nikita-volkov/6977841
https://www.reddit.com/r/haskell/comments/1oicmu/anonymous_records_a_solution_to_the_problems_of/ (<- some criticism of the approach ⬆️)

maybe kinda related?
https://gist.github.com/Icelandjack/6b9745d30cc57900b51269942c3cd504


migrated from mhuesch/poly-rs#14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant