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

Use of self in _init() to reference variables in classes is apparently bad. #4

Open
9thAzure opened this issue Dec 1, 2023 · 1 comment
Labels
question Further information is requested

Comments

@9thAzure
Copy link
Owner

9thAzure commented Dec 1, 2023

Someone said on the Godot discord channel that using self just to reference class variables isn't good practice, as it literally uses that reference to access the variables, as opposed to just accessing the variables it can already access.

or in other words, it goes:

set_variable
vs
access_reference(self).set_variable
@9thAzure
Copy link
Owner Author

9thAzure commented Dec 1, 2023

I don't know whether this is actually true or not, so I think I'll just leave this open until I know more.

@9thAzure 9thAzure added the question Further information is requested label Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant