tc39 / proposal-bind-operator

This-Binding Syntax for ECMAScript
1.75k stars 30 forks source link

Is this proposal dead? #53

Open cshaa opened 6 years ago

cshaa commented 6 years ago

Are there any updates on the state of this proposal? I find both the unary and the binary variant to be very useful and esthetic and I would definitely use them. The problem is that it hasn't been getting any updates for ages and the developers of libraries like TypeScript are afraid to implement it, because it's still an early draft. So what is the current status of this feature? Is it going to get promoted to Stage 1 anytime soon?

saschanaz commented 6 years ago

I found #44 has active discussion.

hax commented 6 years ago

Mostly this proposal is near dead. But I think it could revive to two separate proposals:

zfrisch commented 6 years ago

@hax I'm confused. How would method extraction work? You'd pull out a method from an object so that you can call it with a specific binding ?

mAAdhaTTah commented 6 years ago

@zfrisch I believe the idea is to extract a method whose receiver remains bound to the object it's extracted from.

ljharb commented 6 years ago

@zfrisch imagine, const slice = []::slice; slice(arraylike) rather than Array.prototype.slice.call(arraylike)

charmander commented 6 years ago

@ljharb Wouldn’t that be const slice = [].slice; arraylike::slice()? Or, to use method extraction, const slice = ::Array.prototype.slice.call; slice(arraylike).

Igorbek commented 6 years ago

@charmander to correctly extract it, you'd need

const slice = ::Array.prototype.slice.call;
// or
const slice = ::[].slice.call;

slice(array);
lake2 commented 4 years ago

same question + 1

I need this feature.

hax commented 4 years ago

I'd like to champion this proposal and reshape it. But I first need ask the original champions or tc39 committee whether it was possible.

ackvf commented 2 years ago

I loved this feature when it was first introduced with babel. So sad seeing it die.

js-choi commented 2 years ago

FYI: There are currently three active rival TC39 proposals that are trying to subsume this inactive proposal:

There will be some further discussion at the next plenary meeting in January 2022 about these proposals (see “Holistic review of dataflow proposals” in tc39/agendas#1106). So there’s still ongoing activity in this problem space.