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

File extensions for modules? #2147

Open
JVApen opened this issue Oct 2, 2023 · 2 comments
Open

File extensions for modules? #2147

JVApen opened this issue Oct 2, 2023 · 2 comments

Comments

@JVApen
Copy link

JVApen commented Oct 2, 2023

https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#nl27-use-a-cpp-suffix-for-code-files-and-h-for-interface-files already exists for old-style code using cpp/h files. However, there is no rule for file extensions related to modules. This is primarily important when having a codebase that mixes both behaviors.

It seems we already are introducing several extensions depending on the compiler. (Ref: https://stackoverflow.com/a/76422027/2466431)

@adah1972
Copy link
Contributor

adah1972 commented Nov 5, 2023

I think the Core Guidelines are supposed to be a collection of best practices, so it might be a bit too early to specify which suffix should be used for modules.

@MikeGitb
Copy link

MikeGitb commented Nov 5, 2023

I think the Core Guidelines are supposed to be a collection of best practices, so it might be a bit too early to specify which suffix should be used for modules.

Actually, I think it's not too early, it's too late. I think this is one of the instances, where - due to backwards compatibility - you can't wait on some best practices emerging from its own, but have to proactively standardize things. Otherwise you just end up with 3+ different standards, that all need to be supported indefinitely in parallel.

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

3 participants