Code Monkey home page Code Monkey logo

Comments (6)

Peternator7 avatar Peternator7 commented on June 5, 2024

I wasn't aware that crate existed! I wanted to get iterator into the initial version, but there was already a lot going on.

So it's on my radar, but given that other crate exists, what makes EnumTable a better choice than enum_map?

from strum.

rockboynton avatar rockboynton commented on June 5, 2024

I think enum_iter provides mostly a subset of strum, except in this case. It would be nice to add this feature to strum to allow me to remove a dependency. For me, the .all_ok() method of EnumTable makes it so I can use the ? operator when building the table with from_closure which is a big limitation of enum_map.

That's my 2 cents. Since EnumTable now exists, adding the associated iterator methods seems like a natural extension

from strum.

rockboynton avatar rockboynton commented on June 5, 2024

fwiw I would also say I think the API of enum_map's EnumMap<MyEnum, V> makes more sense than a generated MyEnumTable<V> and would match the API of similar rust collections better

from strum.

Peternator7 avatar Peternator7 commented on June 5, 2024

I'm more inclined to think that given enum_map exists, it just makes more sense to deprecate EnumTable since it's generally a more feature complete implementation.

from strum.

Peternator7 avatar Peternator7 commented on June 5, 2024

I'm going to move toward deprecating EnumTable from strum. Thanks for making me aware of enum_map. I think it's a better solution and there isn't a lot of reason for both to exist.

from strum.

rockboynton avatar rockboynton commented on June 5, 2024

Sounds good, it would be improvement to that crate instead

from strum.

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.