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

[Feat][C++] Unifying namespace and designing more OOP #220

Closed
Thespica opened this issue Aug 11, 2023 · 0 comments
Closed

[Feat][C++] Unifying namespace and designing more OOP #220

Thespica opened this issue Aug 11, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Thespica
Copy link
Contributor

Is your feature request related to a problem? Please describe.
This issue is about designing of namespace. It's really confusing that there are two similar namespace called utils and util, but both are under subdirectory and header called utils.

https://github.com/alibaba/GraphAr/blob/3cd7038cd884bd387d9d005b3165118a6fcfcd31/cpp/include/gar/utils/utils.h#L41

https://github.com/alibaba/GraphAr/blob/3cd7038cd884bd387d9d005b3165118a6fcfcd31/cpp/include/gar/utils/reader_utils.h#L29C18-L29C18

Describe the solution you'd like

  1. Unify name of directories, headers and namespaces to utils or util.

  2. Designing more OOP, reduce functions beyond classes: It will be easier to call C++ functions in Java if we put functions(static or not) in classes rather than in namespaces, because functions must rely on class.

Good example:

https://github.com/alibaba/GraphAr/blob/3cd7038cd884bd387d9d005b3165118a6fcfcd31/cpp/include/gar/graph_info.h#L1091

Bad example:

https://github.com/alibaba/GraphAr/blob/3cd7038cd884bd387d9d005b3165118a6fcfcd31/cpp/include/gar/utils/reader_utils.h#L46

Maybe we can keep origin functions and copy needed to classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants