[gjs/wip/ptomato/mozjs38: 1/18] docs: Overview of new JS features in NEWS
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/wip/ptomato/mozjs38: 1/18] docs: Overview of new JS features in NEWS
- Date: Sat, 28 Jan 2017 21:30:02 +0000 (UTC)
commit 48f662f25668ea698f42b556243a6b2838e8fd27
Author: Philip Chimento <philip chimento gmail com>
Date: Sat Jan 28 13:27:41 2017 -0800
docs: Overview of new JS features in NEWS
Distilled from SpiderMonkey's documentation.
NEWS | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 50 insertions(+), 0 deletions(-)
---
diff --git a/NEWS b/NEWS
index 0bdf1eb..72118d1 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,53 @@
+NEXT
+----
+
+- New JavaScript features! This version of GJS is based on SpiderMonkey 38, an
+ upgrade from the previous ESR (Extended Support Release) of SpiderMonkey 31.
+ Our plans are to continue upgrading to subsequent ESRs as maintainer
+ availability allows. Here are the highlights of the new JavaScript features.
+ For more information, look them up on MDN or devdocs.io.
+
+ * New syntax
+ + Shorthand syntax for method definitions: { foo() { return 5; } }
+ + Shorthand syntax for object literals: let b = 42; let o = {b}; o.b === 42
+ + Computed property names for the above, as well as in getter and setter
+ expressions and destructuring assignment: { ['b' + 'ar']() { return 6; } }
+ + Spread operator in destructuring assignment: let [a, ...b] = [1, 2, 3];
+ + Template literals: `Hello, ${name}` with optional tags: tag`string`
+
+ * New APIs
+ + Symbol, a new fundamental type
+ + WeakSet, a Set which does not prevent its members from being
+ garbage-collected
+ + [Symbol.iterator] properties for Array, Map, Set, String, TypedArray, and
+ the arguments object
+ + New Array and TypedArray functionality: Array.copyWithin(), Array.from()
+ + New return() method for generators
+ + New Number.isSafeInteger() method
+ + New Object.assign() method which can replace Lang.copyProperties() in many
+ cases
+ + New Object.getOwnPropertySymbols() method
+ + New RegExp flags, global, ignoreCase, multiline, sticky properties that
+ give access to the flags that the regular expression was created with
+ + String.raw, a tag for template strings similar to Python's r""
+ + New TypedArray methods for correspondence with Array: entries(), every(),
+ fill(), filter(), find(), findIndex(), forEach(), indexOf(), join(),
+ keys(), lastIndexOf(), map(), of(), reduce(), reduceRight(), reverse(),
+ slice(), some(), values()
+
+ * New behaviour
+ + Temporal dead zone: print(x); let x = 5; no longer allowed
+ + Full ES6-compliant implementation of const keyword
+ + The Set, Map, and WeakMap constructors can now take null as their argument
+ + The WeakMap constructor can now take an iterable as its argument
+ + The Function.name and Function.length properties are configurable
+ + When subclassing Map, WeakMap, and Set or using the constructors on
+ generic objects, they will look for custom set() and add() methods.
+ + RegExp.source and RegExp.toString() now deal with empty regexes, and
+ escape their output.
+ + Non-object arguments to Object.preventExtensions() now do not throw an
+ exception, simply return the original object
+
Version 1.47.4
--------------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]