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

C++ house naming convention #119

Open
mindhells opened this issue Jun 4, 2020 · 1 comment
Open

C++ house naming convention #119

mindhells opened this issue Jun 4, 2020 · 1 comment

Comments

@mindhells
Copy link
Member

mindhells commented Jun 4, 2020

There're different naming conventions in use in the C++ layer of Gnofract4D.
Some examples on user-defined types:

  • MTFractWorker, IImage ...
  • s_pixel_stat, s_rgba, s_pf_data ...
  • fractFunc, pointFunc ...
  • image_reader, image_writer ...

on members:

  • nThreads ...
  • m_totalXres, m_totalYres ...
  • auto_deepen ...
  • lookup_with_transfer() ...
  • totalXres(), getBuffer() ...

which would be the ones to pick for new code or to normalize the existing?

Check this reference

@edyoung
Copy link
Member

edyoung commented Jun 4, 2020

As you've noticed, the naming style is quite inconsistent today, I guess because I have never been that religious about it. In general I would be happy to see more or less any consistent coding style adopted.

Ideally:

  • We adopt one off the shelf rather than defining one
  • it would be one where there was some tooling available to point out inconsistencies
  • any changes to update areas of code to conform to style would only do that, not mixed in with other changes, even refactoring - makes code review much easier.

https://clang.llvm.org/extra/clang-tidy/ might be worth a look

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

2 participants