Skip to content

Conversation

@1090MHz
Copy link

@1090MHz 1090MHz commented Jul 30, 2024

Summary

Propose refactoring the header files to improve readability and reduce the risk of name collisions.

Changes Made

  • Moved header files from PPL/src to PPL/include/PPL for a more standard project layout.
  • Added forwarding headers in PPL/src to maintain backwards compatibility.

Benefits

  • Improved Structure: Separates implementation (.cpp) and header (.h) files into distinct directories, aligning with common C++ practices.
  • Reduced Risk of Name Collisions: Placing headers in PPL/include/PPL reduces the risk of name collisions, especially for common names like settings.h, log.h, processor.h, texture.h, and action.h. This change necessitates using the include style #include "PPL/dataref.h", clearly distinguishing PPL headers from others.
  • Improved Readability: Using #include "PPL/dataref.h" makes it clear which library the header belongs to, improving code readability and reducing ambiguity.
  • Backwards Compatibility: Forwarding headers ensure existing projects referencing these headers remain functional.

Context

Previously, users might have been adding PPL/src as an include directory and using statements like #include "dataref.h". This approach can lead to ambiguity and potential name collisions. By refactoring the project to use PPL/include/PPL, it becomes clear which library the headers belong to, and it aligns with common C++ practices.

I believe these changes will improve the readability of the code and reduce the risk of name collisions.

Thank you for considering this request. Please let me know if you have any feedback or suggestions.

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

Successfully merging this pull request may close these issues.

1 participant