News for hackers. Stuff that matters.
Re:JavaScript Pattern Matching Proposal by _sdegutis on Wednesday April 25, 2018 @10:44AM (#16921925)
I'm not familiar with the JS proposal process. Is this likely to become an official feature now that it's been proposed? If so what's the usual timeline of that look like? I would love to have this feature ASAP in the browser and/or Node.js and am eager to find out when that will be possible.
Re:JavaScript Pattern Matching Proposal by WorldMaker on Wednesday April 25, 2018 @10:49AM (#16921978)
Right now this says it is a Stage 0 proposal, or "Strawman". It's to see if there is interest in the committee to pursue it. So it's hard to tell the likelihood if it will show up in browsers/Node just yet.

The TC39 process: https://tc39.github.io/process-document/

Re:JavaScript Pattern Matching Proposal by habitue on Wednesday April 25, 2018 @10:53AM (#16922027)
This is a Stage 0 proposal. Basically it means somebody with a connection to the TC39 (the committee in charge of the JavaScript standard) has thought this was a good enough idea to put together into a proposal.

In terms of chances of standardization, that's a step up from "Hey, I have a great idea", buy there are plenty of Stage 0 proposals that go nowhere because they lose steam.

I think the metric they look for is who is using the Babel plugin for it. If people are doing that, then they it has a better shot of progressing.

Stage 4 is the "this is getting standardized next time" stage

Re:JavaScript Pattern Matching Proposal by pjmlp on Wednesday April 25, 2018 @01:18PM (#16923761)
Even Stage 4 isn't granted it will end up on the standard, some proposals have died on Stage 4.
Re:JavaScript Pattern Matching Proposal by shados on Wednesday April 25, 2018 @11:10PM (#16928510)
Any example? Since stage 3 is roughly "request for implementers", and Stage 4 requires 2 real world implementations and essentially mean "will be part of the standard in the next wave".

The closest thing I can think of is ES6 modules, because the module loader spec wasn't finished, but the syntax still lived on.

Now, stuff getting kicked down from Stage 3, that has happened.

Re:JavaScript Pattern Matching Proposal by pjmlp on Thursday April 26, 2018 @01:59AM (#16929176)
I was wrong, on my mind I was thinking SIMD has been dropped during stage 4.
Re:JavaScript Pattern Matching Proposal by simlevesque on Wednesday April 25, 2018 @10:49AM (#16921976)
Someone will surely do a Babel plugin to use the syntax allowing you to try it before it becomes an official feature.
Re:JavaScript Pattern Matching Proposal by Already__Taken on Wednesday April 25, 2018 @10:58AM (#16922078)
It's at the bottom of the proposal https://github.com/babel/babel/pull/7633
Re:JavaScript Pattern Matching Proposal by maxmcd on Wednesday April 25, 2018 @10:52AM (#16922016)
Re:JavaScript Pattern Matching Proposal by Axnyff on Wednesday April 25, 2018 @10:48AM (#16921968)
This should help you: http://2ality.com/2015/11/tc39-process.html

Basically, it's just a proposition for the moment, there's no telling if that's gonna be in the language or not. It's only at stage 2 that it is likely that the feature will be added in the language.

Re:JavaScript Pattern Matching Proposal by soccergee on Wednesday April 25, 2018 @10:49AM (#16921979)
Yeah, I think that's essentially the idea. However the longer part is getting the support native in the browsers. Tools like babel will most likely provide some form of support before the browser does.