Comments (4)
The first change seems reasonable to do now. It would be nice to get the opinions of more users first, but I am not sure how to solicit them.
I'll probably hold off on the second. Users are still free to put enum.h
in a subdirectory of their choosing, as you mentioned. I may nest enum.h
in a better-enums
subdirectory later, if the header gets split into multiple files, or if there are a lot of "extras" to distribute. I do already have such a better-enums
directory – it's just not first-class, since the only thing there is the C++17 demo.
from better-enums.
The file nesting isn't that important, it was a side-suggestion. Let's drop that off the plate for now to keep the discussion more focused.
Concerning the macro name, I'd argue that doesn't require feedback at all. Simple macro names are notorious for conflicting with symbols. It's a non-decision to rename it. I think if you expect your library to be used in professional, production code which has millions of lines of code and numerous incoming dependencies, the rename will be an absolute requirement.
Again, I'd like to refer you to the Boost.Preprocessor library. You'll notice they prefix all macros with BOOST_PP
. This is akin to a namespace in the macro world, as you know. The verbosity and "extra characters to type" tradeoff is well worth the guarantee that your library will work out-of-the-box in most (if not all) code bases regardless of size and number of dependencies.
from better-enums.
As I said, I am in favor of changing the macro name. I merely added that it would be nice to get additional feedback, since a large number of people seem to have been fine with ENUM
, and also for good ideas for a replacement name that only 2 people (us) might not come up with. However, I won't be waiting for feedback, since I don't have an efficient way of getting it at this point. I will do this change together with the other changes we are currently discussing.
from better-enums.
I like the name ENUM
too, honestly if there was no conflict the name is perfect. But scattering the #undef
's all over our code base would quickly land me lots of ugly looks from my coworkers in my code reviews :-)
Thanks for welcoming my feedback, you've done a great job.
from better-enums.
Related Issues (20)
- Static functions for enum types HOT 1
- Use in a packed struct HOT 1
- MSVC /permissive- leads to "expression did not evaluate to a constant" HOT 3
- Compiling example code: 5-map.cc fail HOT 2
- enums stops being enums HOT 1
- What is the tool to run better-enums in REPL mode in README.md? HOT 2
- Compile-time name trimming and binary size
- How to reflect to enum with type and value strings? HOT 4
- Need to have standard Debian packaging capability
- Cannot use better_enum from class HOT 1
- Using Better Enums in std::unordered_map as key leads to 'message : see reference to class template instantiation'
- Timeframe for new release / tag
- Provide an update to make_macros.py script to use python3
- Set up GitHub Actions
- C++17 interop: std::optional HOT 2
- Way to opt out of string conversion? HOT 2
- cannot add better_enum values to unordered_set HOT 3
- Member '_value' was not initialized in this constructor HOT 1
- Better-enum in maps HOT 7
- Are there guarantees on size with better enums? HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from better-enums.