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

Should we now allow constants in the FORTRAN code be all uppercase? And start making that change in the code? #2426

Open
ekluzek opened this issue Mar 15, 2024 · 2 comments
Assignees
Labels
code health improving internal code structure to make easier to maintain (sustainability) documentation additions or edits to user-facing documentation

Comments

@ekluzek
Copy link
Collaborator

ekluzek commented Mar 15, 2024

As discussed here:

#2401 (comment)

There's a desire to use all uppercase for constants in the FORTRAN code. I do find this nicely readable. But, as discussed above we didn't allow it because ALL uppercase was reserved for CPP tokens. However, we almost don't have any CPP tokens in the code anymore. And haven't for at least a decade now? So maybe we could start allowing it?

And as a future cleanup after CESM3 do we move to making this change for all constants?

@ekluzek ekluzek added type: -discussion next this should get some attention in the next week or two. Normally each Thursday SE meeting. labels Mar 15, 2024
@samsrabin samsrabin added code health improving internal code structure to make easier to maintain (sustainability) documentation additions or edits to user-facing documentation and removed next this should get some attention in the next week or two. Normally each Thursday SE meeting. type: -discussion labels Mar 21, 2024
@samsrabin
Copy link
Collaborator

Decision: Yes, let's.

  • Use UPPERCASE for constants moving forward. (Let's not comprehensively search and replace yet.)
  • @adrifoster will go ahead and update the standards wiki to reflect this.

@samsrabin
Copy link
Collaborator

@adrifoster also thought about putting constants in a class, like math.pi in Python. But you can't actually set parameters in a FORTRAN class, unless you want to access them through a function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code health improving internal code structure to make easier to maintain (sustainability) documentation additions or edits to user-facing documentation
Projects
Status: No status
Development

No branches or pull requests

3 participants