Giter Site home page Giter Site logo

Comments (6)

kriskowal avatar kriskowal commented on August 28, 2024

There is not standard that introduces Object.addEach, Object.compare, Object.equals, or Object.clone. Object.is was proposed, but has not been reified. It is safe to assume that Object.hash will never become a standard, and is only necessary for polyfilling Map and Set. When it comes to polyfills and prollyfills, it is always hard to tell when to lead and when to follow. Array.prototype.find is one polyfill I got wrong, (I correctly anticipated its standardization but did not anticipate the same semantics) which has been fixed for the unreleased v2 branch.

TC39 looks to code in the wild for patterns to standardize. As such, there is a bit of a chicken and egg problem. See https://www.youtube.com/watch?v=xL3xCO7CLNM

To adopt Collections does mean buying into certain ideas for future standards.

from collections.

kriskowal avatar kriskowal commented on August 28, 2024

(To be clear, I closed the issue because I don’t foresee acting on this. It is not to say that the issue is closed to discussion.)

from collections.

buchanae avatar buchanae commented on August 28, 2024

Thanks for the quick and clear response. At least this development decision/philosophy is documented here now, and here for discussion.

Personally, I disagree. You're imposing unnecessary risk on codebases by making global modifications. Will it result in many terrible headaches, or a few minor ones? I can't say, but I'm fairly confident it will bite someone. If it can be done a different way without much trouble and reduce the risk, why not do it that way?

from collections.

JHumphreyJr avatar JHumphreyJr commented on August 28, 2024

This package definitely interferes with the Array.prototype.find polyfill. Any ETA on a V2 release to resolve this issue?

from collections.

kriskowal avatar kriskowal commented on August 28, 2024

I can’t offer an estimate, but I am moving in this direction on v2 7c674d4

from collections.

timruffles avatar timruffles commented on August 28, 2024

I think it'd be at least good to document this. It's definitely a "principle of least surprise" violation (e.g I was very confused by seeing [].set() in the source) considering the JS ecosystem aversion to extending core types.

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.