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

GROOVY-9754: Provide a record-like equivalent #1375

Closed
wants to merge 1 commit into from

Conversation

paulk-asert
Copy link
Contributor

No description provided.

@eric-milles
Copy link
Member

How close is this to @Immutable + @POJO? Is there a future path where a record keyword maps to this like trait to @Trait?

@paulk-asert
Copy link
Contributor Author

Records are indeed somewhat similar to @immutable + @pojo. There are different getter naming conventions, special serialization rules and some other restrictions on records. The goal here would eventually be to create native records with Groovy syntax, so yes a record keyword would be part of that but I don't think that aspect needs to be sorted before alpha-1 and can be done later like trait was added later for @Trait. The AST transform I think is useful enough in it's own right and would allow record-like classes to be created in the meantime until we consider native record support. We just need to not back ourselves into a corner that would disallow native records as a second step.

@asfgit asfgit closed this in 45c38f9 Sep 26, 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
2 participants