Code Monkey home page Code Monkey logo

Comments (4)

jridgewell avatar jridgewell commented on June 15, 2024 1

I don't want hold up the proposal by trying to trailblaze, and we've seen other proposals fail to reach consensus because they try. Until there's full consensus on the subclassing (or what level of subclassing) by the committee, I think making Array methods that don't allow species is a mistake.

Make Array#filter and Array#filterOut different in one more case definitely a bad idea.

Agreed. I'm not comfortable making filterOut diverge from filter (besides the obvious). Even if we had consensus on subclassing, I would still argue filterOut should match filter exactly.

from proposal-array-filtering.

zloirock avatar zloirock commented on June 15, 2024

One more time: this proposal will break the web. Until it will not be rewritten to recommend something for new features instead of removing existing features, it makes no sense to rely on it.

from proposal-array-filtering.

acutmore avatar acutmore commented on June 15, 2024

There is also discussion in https://github.com/tc39/ecma262/pull/2360/files about not encouraging extending builtins.

Maybe this will apply to new methods that don't already exist on the web.

from proposal-array-filtering.

zloirock avatar zloirock commented on June 15, 2024

I don't see any decision about the standard new approach - subclassing of instance methods should be completely removed (that is differently a mistake - it's actively used in wild, some examples by the link above), should be an alternative of @@species or this kind of subclassing will remain as it is? Wait some more years for the decision about this proposal and block all proposals that it could affect is a bad idea. Until the new approach is not approved, should be used the way that is a standard at this moment.

It's an array method and @@species pattern was added mainly for arrays.

Make Array#filter and Array#filterOut different in one more case definitely a bad idea.

from proposal-array-filtering.

Related Issues (16)

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.