Sitelet https://github.com/nodejs/node/issues/1655
Skip to content

Yes, Fat Arrows are still broken #1655

Description

@garthk

(Tracking issue to save time for the curious and those they'd otherwise hound.)

Developers champing at the bit for native fat arrows? Worried about them being hidden behind a flag? Hounded by that one developer who insists they tried it and it's fine? Worried about the ominous warnings on the ES6 on io.js page?

really buggy or even broken features like Arrow Functions

Your first stop should be V8 issue 2700. Check to see if it's blocked (left column, just above "add a comment"):

  • Not blocked? Perhaps fat arrows are on their way! Add a comment or update this text.
  • Still blocked? Send the list below to that developer. Done!

v8 4.2.77.18 in io.js 2.0.0 still has trouble with:

If you need fat arrows, consider transpilation.

Activity

  1. cjihrig commented on May 7, 2015

    @cjihrig
    Contributor

    Does this need to remain open to be used as a reference?

  2. Fishrock123 commented on May 7, 2015

    @Fishrock123
    Contributor

    Fat Arrows are still broken

    Yeeep.

    Does this need to remain open to be used as a reference?

    I don't think so. Closing, hopefully people will search it. :)

  3. friday commented on Jul 7, 2015

    @friday

    Not blocked any more. It will will be shipped with Chrome 45 https://twitter.com/malyw/status/608943596918702080. However according to https://kangax.github.io/compat-table/es6/ support is still lacking for lexical "super" binding and lexical "new.target" binding.

  4. sugar700 commented on Jul 23, 2015

    @sugar700

    @friday: That's because new.target doesn't work in Chrome at all without flags (so it cannot work with arrows, because it doesn't even work outside of those), and lexical "super" binding is here, but classes require strict mode in Chrome for some reason (this is problem with classes, not arrow functions).

    Would say it's implemented.

  5. friday commented on Jul 23, 2015

    @friday

    Thanks for clearing out the confusion @xfix :)

  6. albertorestifo commented on Jul 29, 2015

    @albertorestifo

    Now arrow functions are shipped in V8. When can we expect them in iojs?

  7. Fishrock123 commented on Jul 29, 2015

    @Fishrock123
    Contributor

    Now arrow functions are shipped in V8.

    No not quite. They aren't in a stable v8 yet afaik (they are in 4.5). The latest stable is 4.4 -- anything can happen before then.

  8. albertorestifo commented on Jul 29, 2015

    @albertorestifo

    @Fishrock123 Oh right! I forgot they shipped it in the latest Chrome Beta, not the stable. My bad!

  9. steelbrain commented on Aug 6, 2015

    @steelbrain

    It would be nice to have a beta build of iojs that uses the beta v8 branch.

  10. sjmueller commented on Aug 7, 2015

    @sjmueller

    +1 on beta builds with latest v8. It would also be awesome to have documentation in iojs about which v8 options actually have an implementation exposed. For example, it's very misleading to have --harmony_modules when enabling yields no benefits whatsoever to the developer.

    We are getting to the point in the server side where transpilation may not be necessary to have your es2015+ cake and eat it too. But without more clarity on where the line is drawn for a particular release, it's a game of enabling the flag, getting an error, then hunting down the version of v8 that iojs is using, then searching for the latest features in v8, then looking back in the history to see if/when it was implemented, etc etc.

  11. bnoordhuis commented on Aug 7, 2015

    @bnoordhuis
    Member

    The V8 API changes frequently and is often broken in development. Maintaining a working build of io.js would be a a big time sink for little gain. Few people run unstable releases in any serious capacity and bug reports would be mostly useless because of the ever moving target.

  12. sjmueller commented on Aug 23, 2015

    @sjmueller

    Are some harmony flags blocked in iojs? Using this command:

    node --es_staging --harmony_arrow_functions server.js
    

    results in this error: SyntaxError: Unexpected token =>

    This is why it would be great to know the status of each harmony flag for the current release of iojs, so that it's easy to understand what can be experimented with and what can't. Running iojs --v8-options | grep "in progress" gives you a list, but its just misleading. Like I said in the previous post, the harmony_modules is on the list, but I don't think it can be used in any shape or form. Or can it? I don't know; maybe I'm doing something wrong here.

  13. targos commented on Aug 23, 2015

    @targos
    Member

    @sjmueller A good place to go for a list of supported features is kangax's compatibility table: https://kangax.github.io/compat-table/es6/#iojs.
    There you see that arrow functions are not available in io.js. To have an idea of what will probably be in the next major version, you can look at the column for the current beta of Chrome (CH 45)

  14. Fishrock123 commented on Aug 23, 2015

    @Fishrock123
    Contributor

    This is why it would be great to know the status of each harmony flag for the current release of iojs, so that it's easy to understand what can be experimented with and what can't.

    That's a fair bit to keep track of haha, are you volunteering? The official way right now is "go try it". :P

    Arrow Functions are coming in V8 4.5 though! https://www.chromestatus.com/feature/5047308127305728

    That roughly translates to "should be in node 5.0.0 in october". :)

    (End of Aug/early sept: node 4.0.0, Oct: 4.0.0 LTS, node 5.0.0, 2016 April: node 6, 2016 oct: node 7, etc...)

  15. sjmueller commented on Aug 24, 2015

    @sjmueller

    @Fishrock123 @targos I understand how it could be a fair amount of work, especially since the answer isn't a binary one. Usually the feature is behind a flag because it's x% done, so quantifying that every release would be cumbersome.

    Perhaps there's a simpler way to get the message to folks who want to play around. So going back to --harmony_modules, I enabled it and got the error, then asked myself am i doing it wrong?. So then I google it, and stackoverflow says it was enabled on node 0.12 half a year ago. So I think, iojs is more advanced than node with modern ver of v8, so i must be doing it wrong. I guess that is where the confusion comes in.

    So let's start the list then. I'll fill in a few:

    iojs 3.1
    --harmony_modules (unavailable)
    --harmony_arrays (partial)
    --harmony_array_includes (?)
    --harmony_regexps (?)
    --harmony_arrow_functions (unavailable)
    --harmony_proxies (?)
    --harmony_sloppy (partial)
    --harmony_unicode_regexps (?)
    --harmony_reflect (?)
    --harmony_destructuring (?)
    --harmony_object (?)
    
  16. steelbrain commented on Sep 2, 2015

    @steelbrain

    Guys, chrome 45 just released, and according to chromestatus, they are in it. Which means that it's stable now, it'd be nice to have them in iojs

  17. albertorestifo commented on Sep 2, 2015

    @albertorestifo

    Yes, and all the Arrow Functions issues have been closed

  18. zowers commented on Sep 2, 2015

    @zowers

    v8 with arrow functions is in #2632

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions