Giter VIP home page Giter VIP logo

Comments (4)

aantron avatar aantron commented on July 26, 2024

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.

rcdailey avatar rcdailey commented on July 26, 2024

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.

aantron avatar aantron commented on July 26, 2024

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.

rcdailey avatar rcdailey commented on July 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.