r/javascript • __proto__ • May 30 '17

Node 8.0.0 released

https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V8.md
319 Upvotes

56 comments sorted by

View all comments

52

u/norlin May 30 '17

and still no native import/export :(

31

u/VertiGuo May 30 '17

1

u/Graftak9000 May 31 '17

It's my understanding the challenge comes from asynchronous loading, so why not start by transitioning to the export/import syntax, then at least some packages will be ES6 module compliant by the time support hits.

1

u/[deleted] May 31 '17

I actually think that they are making the right move here -- import/export in ES6+ is fundamentally async. If they implement their own synchronous version, Node is now using parts of the standard JavaScript language in a non-standard way, which will become all but impossible to ever rectify.

The could extend 'require' to replicate the import/export syntax without using those keywords, but then they are going to be adding syntax into their framework when they know that it is only a temporary stop gap until they can properly implement import/export, which seems more than a little icky.