Example of real world usage of function bind syntax
sebmck at gmail.com
Thu Jun 11 15:37:06 UTC 2015
Not really. It would require something like Recast (https://github.com/benjamn/recast) to do nondescructive pretty printing to retain as much of the source formatting as possible. This shouldn’t be necessary though as if you’re using these experimental features extensively enough in production apps to justify the existence of a transpiler for dead experimental features then you’ve already committed a sin.
On Thu, Jun 11, 2015 at 4:32 PM, Matthew Robb <matthewwrobb at gmail.com>
> @Sebastian It would be interesting to explore having a defined method of
> deprecation for features. Basically say this bind syntax is being dropped,
> I'd like Babel to be able to transpile all of my SOURCE files to remove
> it's usage. Has anything like this been discussed before?
> - Matthew Robb
> On Thu, Jun 11, 2015 at 11:28 AM, Domenic Denicola <d at domenic.me> wrote:
>> From: es-discuss [mailto:es-discuss-bounces at mozilla.org] On Behalf Of
>> Matthew Robb
>> > I would be significantly less excited about it if this happens. The
>> ability to pass around "lightly" bound references to methods is a big deal
>> imo and a large part of the value in this proposal.
>> Definitely agree. Being able to do `foo.map(::this.bar)` is really great,
>> and even `const extracted = ::foo.bar` is nothing to sneeze at.
>> I know there's a thread on the issue tracker where a few vocal voices are
>> complaining that they want partial application syntax and bikeshedding on
>> various operator forms related to that, but I don't think that should
>> discourage the excellent benefits that you're giving to everyone but those
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss