Example of real world usage of function bind syntax

Andrea Giammarchi andrea.giammarchi at gmail.com
Thu Jun 11 15:35:40 UTC 2015

Hi Sebastian,
  I know Babel is kinda explicit but the way it's being promoted and
described in every talk I see does not warn, does not talk about caveats,
it's like developers don't want to see and believe there are no problems at

As example, if I write this code in the live transpiler, which is what
developers show at conferences:
var o = {method: function () {
  return this;


I don't see warnings.

Moreover, if I use syntax that might break because of core.js gotchas, I'd
like to see warnings in there too. Babel might be the better place, doing a
better analysis than a polyfill as core.js is, at recognizing potentially
problematic patterns and warn about them too.

For instance, every time I tell developers they cannot trust Symbols with
Object.create(null) objects they go like: "uh???!" because they either
didn't read Babel or core.js caveats section.

Again, not saying it's your fault, I just think something more could be
done (and not even that sure what exactly)

Best Regards

On Thu, Jun 11, 2015 at 5:25 PM, Sebastian McKenzie <sebmck at gmail.com>

> In Babel all the experimental features are behind flags and the docs (
> http://babeljs.io/docs/usage/experimental/) are very explicit about their
> status:
> > Subject to change
> > These proposals are subject to change so use with extreme caution. Babel
> may update without warning in order to track spec changes.
> Even the blog posts announcing new features (
> http://babeljs.io/blog/2015/05/14/function-bind/) have warnings at the
> top:
> > Warning: This syntax is highly experimental and you should not use it
> for anything serious (yet). If you do use this syntax, please provide
> feedback on GitHub.
> So I’m curious to hear what suggestions you have to make this clearer.
> On Thu, Jun 11, 2015 at 4:19 PM, Andrea Giammarchi <
> andrea.giammarchi at gmail.com> wrote:
>> not arguing or anything, and just as parenthesis, but this:
>> On Thu, Jun 11, 2015 at 4:31 PM, Kevin Smith <zenparsing at gmail.com>
>> wrote:
>>> Not sure you should use it in production, just yet...
>> is what I keep seeing as pattern:
>>   1. here: please try this but don't use in production since not standard
>> (see transpilers early adoption, __proto__, etc)
>>   2. ... developers write code regardless ...
>>   3. too late to drop "that" since it's already in production out there
>> I wish Babel or any other transpilers warned in red everything that does
>> not come from standards, reminding that things could and probably will
>> change, so that it's clear developers can test "at home" but not deploy
>> (unless they truly know what they are doing or they are OK risking changes).
>> Please don't get me wrong, I do like the :: proposal but the way it's
>> going out, I'm not sure is the best we can do as TC39/developers
>> collaboration.
>> Best Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150611/f79dbc98/attachment.html>

More information about the es-discuss mailing list