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

Remove global variables #6

Closed
cxong opened this issue Jan 19, 2013 · 3 comments
Closed

Remove global variables #6

cxong opened this issue Jan 19, 2013 · 3 comments
Assignees
Milestone

Comments

@cxong
Copy link
Owner

cxong commented Jan 19, 2013

No description provided.

@ghost ghost assigned cxong Jan 20, 2013
@cxong
Copy link
Owner Author

cxong commented Feb 5, 2013

An intermediate step is to keep the global variables, but:

  • name them with a g* prefix so they are easily visible
  • pass them through parameters instead of having different functions reference them
  • try to get to the stage where only one module or function ever uses the global directly

This means it'll be easy to simplify the lifetime management of the variables, and eventually combine them into local structures. This was done with the credits loading/displaying system recently.

@cxong
Copy link
Owner Author

cxong commented May 20, 2013

To search for global variables search for \bg[A-Z]\w*

  • \b - word boundary
  • g - g
  • [A-Z] - an uppercase letter
  • \w* - rest of the word

@cxong cxong mentioned this issue Aug 8, 2013
6 tasks
@cxong
Copy link
Owner Author

cxong commented Aug 29, 2013

Closing because this is a huge task that will take a long time to complete; treat it more as a style or refactor guide.

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

1 participant