You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "deepzliu (via GitHub)" <gi...@apache.org> on 2023/03/22 02:47:18 UTC

[GitHub] [arrow] deepzliu commented on pull request #34555: GH-34556: [C++] Add prefix 'ACT_' for 'arrow::Compression::type' to avoid naming conflicts

deepzliu commented on PR #34555:
URL: https://github.com/apache/arrow/pull/34555#issuecomment-1478846712

   > In general, we use the Google C++ Style. It says:
   > 
   > https://google.github.io/styleguide/cppguide.html#Enumerator_Names
   > 
   > > Enumerators (for both scoped and unscoped enums) should be named like [constants](https://google.github.io/styleguide/cppguide.html#Constant_Names), not like [macros](https://google.github.io/styleguide/cppguide.html#Macro_Names). That is, use kEnumName not ENUM_NAME.
   > 
   > But our code doesn't follow the style. (It seems that `clang-format` doesn't support it.)
   > 
   > In general, we should use `kEnumName` style but it breaks many APIs. We should discuss this on `dev@arrow.apache.org`. Could you start a discussion on `dev@`?
   > 
   > Anyway, we can avoid the problem by undefing conflicting macros like the followings:
   > 
   > ```c++
   > #include <rocksdb/...>
   > 
   > #undef SNAPPY
   > #undef ZLIB
   > #undef ...
   > 
   > #include <arrow/...>
   > ```
   
   This is a good solution, but it should not solve some complex project situation, not specific at the moment.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org