Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yes, Fat Arrows are still broken #1655

Closed
3 tasks
garthk opened this issue May 7, 2015 · 18 comments
Closed
3 tasks

Yes, Fat Arrows are still broken #1655

garthk opened this issue May 7, 2015 · 18 comments
Labels
v8 engine Issues and PRs related to the V8 dependency.

Comments

@garthk
Copy link

garthk commented May 7, 2015

(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.

garthk referenced this issue in nodejs/iojs.org May 7, 2015
@cjihrig
Copy link
Contributor

cjihrig commented May 7, 2015

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

@Fishrock123
Copy link
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. :)

@friday
Copy link

friday commented Jul 7, 2015

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.

@KamilaBorowska
Copy link

@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.

@friday
Copy link

friday commented Jul 23, 2015

Thanks for clearing out the confusion @xfix :)

@albertorestifo
Copy link

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

@Fishrock123
Copy link
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.

@albertorestifo
Copy link

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

@steelbrain
Copy link

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

@sjmueller
Copy link

+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.

@bnoordhuis
Copy link
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.

@sjmueller
Copy link

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.

@targos
Copy link
Member

targos commented Aug 23, 2015

@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)

@Fishrock123
Copy link
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...)

@Fishrock123 Fishrock123 added the v8 engine Issues and PRs related to the V8 dependency. label Aug 23, 2015
@sjmueller
Copy link

@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 (?)

@steelbrain
Copy link

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

@albertorestifo
Copy link

Yes, and all the Arrow Functions issues have been closed

@zowers
Copy link

zowers commented Sep 2, 2015

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
Labels
v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

No branches or pull requests