Giter Site home page Giter Site logo

Comments (8)

solnic avatar solnic commented on July 19, 2024 2

We already have features that are not available in plain Hash API and I don't think it was ever a requirement that Container must be replaceable by a plain Hash.

from dry-container.

timriley avatar timriley commented on July 19, 2024 1

This feature seems like the kind of generic functionality that would fit just fine in dry-container.

After all, dry-container already supports the idea of "namespaces" when it comes to registering entries, and we can already hack together a namespaced iteration like @paul demonstrates, so I think it'd be good to have in place here.

from dry-container.

davydovanton avatar davydovanton commented on July 19, 2024

hey, I think it's a good idea and this functionality can be useful in other projects/gems. But I'm not sure that should we really add it to dry-container. @solnic @timriley WDYT folks?

from dry-container.

solnic avatar solnic commented on July 19, 2024

But I'm not sure that should we really add it to dry-container.

@davydovanton why?

from dry-container.

davydovanton avatar davydovanton commented on July 19, 2024

@solnic I think it can be useful in business logic more (just IMHO) and I'm not sure that it's a good idea to make dry-container more complex. Also, I see one good example of usage of this functionality in hanami (like use internal container Container['hanami.core'] or something like this, but in hanami we use dry-system). That's why I think it will be a good idea to implement it in dry-system's container. But it will be ok for me to implement it in dry-container too. I just want to say that I see it as a dry-system feature more.

from dry-container.

solnic avatar solnic commented on July 19, 2024

I agree, this should be implemented here.

from dry-container.

flash-gordon avatar flash-gordon commented on July 19, 2024

The potential problem is if some API depends on this feature you won't be able to swap the container with a plain hash or something else.

from dry-container.

timriley avatar timriley commented on July 19, 2024

True, but I think that's something we can live with.

from dry-container.

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.