Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is this proposal dead? #53

Open
m93a opened this issue Mar 17, 2018 · 11 comments
Open

Is this proposal dead? #53

m93a opened this issue Mar 17, 2018 · 11 comments

Comments

@m93a
Copy link

m93a commented Mar 17, 2018

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
Copy link

I found #44 has active discussion.

@hax
Copy link
Member

hax commented Mar 19, 2018

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

  • method extraction, suppose the syntax is

    • infix op (which I prefer): a.&b and a[&b], or
    • prefix op: &a.b and &a[b]

    And support const {&b} = a; for destructuring.

  • extension methods/accessors, suppose the syntax is

    • method: a::b()
    • accessor: a::b = 1

@zfrisch
Copy link

zfrisch commented Oct 24, 2018

@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
Copy link

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

@ljharb
Copy link
Member

ljharb commented Oct 24, 2018

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

@charmander
Copy link

charmander commented Oct 24, 2018

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

@Igorbek
Copy link

Igorbek commented Oct 24, 2018

@charmander to correctly extract it, you'd need

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

slice(array);

@lake2
Copy link

lake2 commented Sep 23, 2020

same question + 1

I need this feature.

@hax
Copy link
Member

hax commented Sep 23, 2020

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
Copy link

ackvf commented Jan 14, 2022

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

@js-choi
Copy link

js-choi commented Jan 14, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests