I don't quite get this, maybe someone can help. There's already a proposal for adding the existential operator in ECMAScript, if you're going to require babel transpilation why not simply write a babel plugin for the existential operator and use that?
If the argument is "because the proposal is immature and could be withdrawn" then the counter argument is that you have basically extended the language already by providing a built in "idx" global much like, say, parseFloat, with the difference that your function does not have any chance of actually being in the spec at any point, unlike the existential operator, thus you're basically masquerading the fact that using idx and the current proposal is the exact same thing just with different syntax.
At Facebook, we use Flow for type safety. We didn't want to have to introduce support for the existential operator until all of the details were more finalized.
Until then, we needed to have something that required minimal work (e.g. changes to the parser) that could tie us over until the language had proper support.
Also, we've been using this before the existential operator was formally proposed. (I should've probably got off my lazy butt to publish this sooner, but oh well.)
The plan is indeed to codemod this to the existential operator when it becomes available.
I haven't heard of this either. I guess they just wanted something that worked with minimal effort. Making the plugin and writing/coming up with spec tests takes time but albeit a better effort for the community overall. Maybe we can get more contributors for this effort now?
If the argument is "because the proposal is immature and could be withdrawn" then the counter argument is that you have basically extended the language already by providing a built in "idx" global much like, say, parseFloat, with the difference that your function does not have any chance of actually being in the spec at any point, unlike the existential operator, thus you're basically masquerading the fact that using idx and the current proposal is the exact same thing just with different syntax.