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 Request] lazy @val properties #599

Open
EotT123 opened this issue Jun 2, 2024 · 1 comment
Open

[Feature Request] lazy @val properties #599

EotT123 opened this issue Jun 2, 2024 · 1 comment

Comments

@EotT123
Copy link
Contributor

EotT123 commented Jun 2, 2024

Could it be possible to add lazy initialized fields when using properties? (similar to Lombok's @Getter(lazy=true)

The same syntax could be used, e.g. @val(lazy = true) Object object = <ExpensiveCalculation>;. This should only be added for @val (not for @var,@set,...), as it is only relevant for immutable fields.

@rsmckinney
Copy link
Member

I am probably going to expand properties to support observable, delegation, lazy etc. a la Kotlin. See #256.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants