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

Fix namespace pollution by num module #741

Closed
rhdtownsend opened this issue Oct 21, 2024 · 2 comments · Fixed by #742
Closed

Fix namespace pollution by num module #741

rhdtownsend opened this issue Oct 21, 2024 · 2 comments · Fixed by #742
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@rhdtownsend
Copy link
Contributor

The num module currently re-exports a number of variables defined in other modules (e.g., const). This is bad practice, and should be an easy fix.

@rhdtownsend rhdtownsend added enhancement New feature or request good first issue Good for newcomers labels Oct 21, 2024
@pmocz pmocz self-assigned this Oct 21, 2024
@pmocz
Copy link
Member

pmocz commented Oct 21, 2024

@rhdtownsend could you give some examples and where to find them in the source?

@rhdtownsend
Copy link
Contributor Author

Sure -- if you take a look in num/public/num_lib.f, you'll see there are no private/public statements before the contains statement. This means that all of the symbols e.g. from const_def are re-exported by num.

What we should have, before the contains statement, is

private
public :: func1
public :: func2

...where func1, func2, etc are the names of the routines defined in num_lib.

@pmocz pmocz linked a pull request Oct 21, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants