-
Notifications
You must be signed in to change notification settings - Fork 130
1.0.0 (Work in Progress, Releases on Jan 13th) #27
Changes from 2 commits
a3586ff
8d22062
907d8b6
97479c5
5c7d88f
914a84e
f6fe71f
1f61e50
85b736b
d66c7cd
c7acafc
b0d89cb
b6935d4
3247ac0
cddc13c
0145510
b3da423
fdabf59
1732823
f729806
8f8ccd6
28a0e91
1ffb6e1
dbca2d8
8137e28
44fb9f0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" class="faq"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="description" content="iojs"> | ||
<meta name="keywords" content="iojs, io.js, io js, javascript io, uv, libuv, node-forward, node forward, node, node.js, node.js forward, nodejs, nodejs forward, javascript"> | ||
<title>Javascript IO - FAQ</title> | ||
<link href="style.css" rel="stylesheet" type="text/css"> | ||
|
||
</head> | ||
|
||
<body> | ||
<h1 class="heading">ES6 on io.js</h1> | ||
|
||
<div class="description"> | ||
|
||
<p>io.js is built against modern versions of <a href="https://code.google.com/p/v8/">V8</a>. By keeping up-to-date with the latest releases of this engine we ensure new features from the <a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">JavaScript ECMA-262 specification</a> are brought to io.js developers in a timely manner, as well as continued performance and stability improvements.</p> | ||
<p>Version 1.0.0 of io.js ships with V8 3.31.71.4, which includes ES6 features well beyond version 3.26.33 that will be shipped with joyent/[email protected].</p> | ||
</div> | ||
|
||
<div class="faq-item"> | ||
|
||
<h2 class="faq-title">No more --harmony flag</h2> | ||
<div class="faq-body"> | ||
<p>On joyent/[email protected] (V8 3.26), the <code>--harmony</code> runtime flag enabled all <strong>completed</strong>, <strong>staged</strong> and <strong>in progress</strong> ES6 features together, in bulk (with the exception of nonstandard/non-harmonious semantics for <code>typeof</code> which were hidden under <code>--harmony-typeof</code>). This meant that some really buggy or even broken features like <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy">proxies</a> were just as readily available for developers as <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*">generators</a>, which had very little or even no known-issues. As such, it was best practice to either enable only certain features by using specific runtime harmony feature flags (e.g. <code>--harmony-generators</code>), or simply enable all of them and then use a restricted subset.</p> | ||
<p>With [email protected] (V8 3.31+), all that complexity goes away. All harmony features are now logically split into three groups for <strong>shipping</strong>, <strong>staged</strong> and <strong>in progress</strong> features:</p> | ||
|
||
<ul class="task-list"> | ||
<li>All <strong>shipping</strong> features, the ones that V8 has considered stable, like <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*">generators</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings">templates</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_6_support_in_Mozilla#Additions_to_the_String_object">new string methods</a> and many others are turned <strong>on by default on io.js</strong> and do <strong>NOT</strong> require any kind of runtime flag. </li> | ||
This comment was marked as off-topic.
Sorry, something went wrong. |
||
<li>Then there are <strong>staged</strong> features which are almost-completed features that haven't been completely tested or updated to the latest spec yet and therefore are not considered stable by the V8 team (e.g. there might be some edge cases left to discover). This is probably the equivalent of the state of <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*">generators</a> on 3.26. These are the "use at your own risk" type of features that now require a runtime flag: <code>--es_staging</code> (or its synonym, <code>--harmony</code>).</li> | ||
<li>Finally, all <strong>in progress</strong> features can be activated individually by their respective harmony flag (e.g. <code>--harmony_arrow_functions</code>), although this is highly discouraged unless for testing purposes.</li> | ||
</ul> | ||
</div> | ||
|
||
<h2 class="faq-title"> | ||
Which ES6 features ship with io.js by default (no runtime flag required)? | ||
</h2> | ||
<div class="faq-body"> | ||
<ul class="task-list"> | ||
<li>Block scoping</li> | ||
<ul class="task-list"> | ||
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let">let</a></li> | ||
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const">const</a></li> | ||
<li><code>function</code>-in-blocks (<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode">strict mode only)</a></li> | ||
</ul> | ||
<li>Collections</li> | ||
<ul class="task-list"> | ||
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map">Map</a></li> | ||
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap">WeakMap</a></li> | ||
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set">Set</a></li> | ||
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet">WeakSet</a></li> | ||
</ul> | ||
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*">Generators</a></li> | ||
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Numeric_literals">Binary and Octal literals</a></li> | ||
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promises</a></li> | ||
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_6_support_in_Mozilla#Additions_to_the_String_object">New String methods</a></li> | ||
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol">Symbols</a></li> | ||
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings">Template strings</a></li> | ||
</ul> | ||
|
||
<p>You can view a more detailed list, including a comparison with other engines, on the <a href="https://kangax.github.io/compat-table/es6/">compat-table</a> project page.</p> | ||
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
Sorry, something went wrong. |
||
</div> | ||
</div> | ||
|
||
<div class="faq-item"> | ||
<h2 class="faq-title"> | ||
Which ES6 features are behind the --es_staging flag? | ||
</h2> | ||
<div class="faq-body"> | ||
<ul class="task-list"> | ||
This comment was marked as off-topic.
Sorry, something went wrong. |
||
<li><a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class">Classes</a> (strict mode only)</li> | ||
<li><a href="http://wiki.ecmascript.org/doku.php?id=harmony:object_literals">Object literal extensions</a></li> | ||
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
Sorry, something went wrong. |
||
<li> | ||
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol"><code>Symbol.toStringTag</code></a> (user-definable results for <code>Object.prototype.toString</code>)</li> | ||
</ul> | ||
</div> | ||
</div> | ||
|
||
<div class="faq-item"> | ||
|
||
<h2 class="faq-title"> | ||
I have my infrastructure set up to leverage the --harmony flag. Should I remove it? | ||
</h2> | ||
<div class="faq-body"> | ||
<p>The current behaviour of the <code>--harmony</code> flag on io.js is to enable <strong>staged</strong> features only. After all, it is now a synonym of <code>--es_staging</code>. As mentioned above, these are completed features that have not been considered stable yet. If you want to play safe, especially on production environments, consider removing this runtime flag until it ships by default on V8 and, consequently, on io.js. If you keep this enabled, you should be prepared for further io.js upgrades to break your code if V8 changes their semantics to more closely follow the standard.</p> | ||
</div> | ||
</div> | ||
|
||
<div class="faq-item"> | ||
|
||
<h2 class="faq-title"> | ||
How do I find which version of V8 ships with a particular version of io.js? | ||
</h2> | ||
<div class="faq-body"> | ||
<p>io.js provides a simple way to list all dependencies and respective versions that ship with a specific binary through the <code>process</code> global object. In case of the V8 engine, type the following in your terminal to retrieve its version:</p> | ||
This comment was marked as off-topic.
Sorry, something went wrong. |
||
<div class="highlight highlight-sh"><pre>iojs -e <span class="pl-s1"><span class="pl-pds">'</span>console.log(process.versions.v8)<span class="pl-pds">'</span></span></pre></div> | ||
|
||
<p>E.g. output: <code>3.31.71.4</code>.</p> | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="faq-item"> | ||
|
||
<h2 class="faq-title"> | ||
How frequently do you plan on updating V8? | ||
</h2> | ||
<div class="faq-body"> | ||
<p>A formal plan has not been discussed yet but the TC is looking into regular updates, especially if there are no breaking changes from V8's API.</p> | ||
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
Sorry, something went wrong. |
||
</div> | ||
</div> | ||
|
||
This comment was marked as off-topic.
Sorry, something went wrong. |
||
</body> | ||
</html> |
This comment was marked as off-topic.
Sorry, something went wrong.