GithubHelp home page GithubHelp logo

Comments (4)

malarzm avatar malarzm commented on August 15, 2024 1

I'm 👎 as passing a property name doesn't tell us how to get a property out of an object (so we'll need to check public access, getter, reflection). Also tooling won't be able to find usages of a property/method as it's hidden behind "magical" access.

from collections.

yassinechabli avatar yassinechabli commented on August 15, 2024

i see that there is an accurate cases that can be handled.
The first easy one
When handling a collection of object that has the getter of the property in question => easy to get the property value.
The second case
if the object class has only __get method => the function pluck will handle a lot of cases .

In general ,I think using reflection could resolve the problem in all cases .

i'm a wrong ?

from collections.

someniatko avatar someniatko commented on August 15, 2024

IMO an abstract collection should not depend on internals of its underlying elements.

from collections.

lcobucci avatar lcobucci commented on August 15, 2024

Agreed, this isn't a fit for this library since it involves object introspection and might potentially break encapsulation.

I think that the benefits are very limited, so will close this as "won't fix".

from collections.

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.