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

Switch From Lazy Vals To null init Pattern #20

Open
isomarcte opened this issue Sep 26, 2022 · 2 comments
Open

Switch From Lazy Vals To null init Pattern #20

isomarcte opened this issue Sep 26, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@isomarcte
Copy link
Member

Avoid possible Scala 2 synchronization bugs by using the null init pattern instead oflazy vals.

Context: #19 (comment)

@isomarcte isomarcte added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Sep 26, 2022
@isomarcte
Copy link
Member Author

As noted on #45, when prototyping this we should ensure we are creating the backing vals as private[this] to avoid extra method wrappers generated by the Scala compiler.

@armanbilge
Copy link
Member

Ah, I completely forgot we had discussed this before, sorry!

Avoid possible Scala 2 synchronization bugs

Just to clarify: I was more concerned about the performance cost of synchronization, rather than bugs.

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

2 participants