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

Discuss global variables #29

Open
t-b opened this issue Jan 3, 2023 · 3 comments
Open

Discuss global variables #29

t-b opened this issue Jan 3, 2023 · 3 comments
Labels

Comments

@t-b
Copy link
Member

t-b commented Jan 3, 2023

See https://www.wavemetrics.com/comment/23620#comment-23620.

@t-b t-b added the enhancement label Jan 3, 2023
@MichaelHuth
Copy link
Member

Regarding the approach to use structures for performance:

It is also my favorite, because you save either

  • memory allocations from creating waves
  • do not suffer from lookups in data folders

The disadvantage is that you have to carry them around compared to NVAR/SVAR.

@t-b
Copy link
Member Author

t-b commented Jan 4, 2023

The disadvantage is that you have to carry them around compared to NVAR/SVAR.

Well you can also view that as a feature, as you make the dependency clear.

@t-b
Copy link
Member Author

t-b commented Jan 4, 2023

Proposal:

  • Only use global string/variables/waves for persistance/caching/background functions
  • It an be beneficial to group similiar global strings/variables in datafolders
  • An alternative approach would be to collate similiar global strings/variables in global waves
  • To prevent global variables, use structures to pass values between functions

@t-b t-b added question and removed enhancement labels Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants