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

Reduce overused pointers and dereferences #37

Open
trietsch opened this issue Aug 16, 2021 · 1 comment
Open

Reduce overused pointers and dereferences #37

trietsch opened this issue Aug 16, 2021 · 1 comment

Comments

@trietsch
Copy link
Contributor

While adding new features to the CLI, I've noticed that we overuse pointers. We don't need this many pointers. When should we use pointers?

  1. While mutating an element passed as a parameter to a function
  2. When you need to differentiate between nil and empty/default
  3. When handling large structs, it might be useful

I propose to simplify the source code, by removing pointers where possible.

Information references:

@trietsch
Copy link
Contributor Author

@trietsch @bvdeenen @jankeesvanandel agreed on reducing the use of pointers.

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

No branches or pull requests

1 participant