PHPNews

Asynchronous stack traces: why `await` beats `.then()`

Written by Mathias Bynens - Published on Mathias Bynens
Aggregated on Tuesday September 12, 2017 - Permalink

Compared to using promises directly, not only can async and await make code more readable for developers — they enable some interesting optimizations in JavaScript engines, too! This write-up is about one such optimization involving stack traces for asynchronous code.

Continue reading »


Unicode-aware regular expressions in ECMAScript 6

Written by Mathias Bynens - Published on Mathias Bynens
Aggregated on Tuesday August 26, 2014 - Permalink

This article explains the effects of the new u flag for regular expressions in ES6.

Continue reading »


Valid JavaScript variable names in ECMAScript 6

Written by Mathias Bynens - Published on Mathias Bynens
Aggregated on Tuesday March 3, 2015 - Permalink

ES6 updates the grammar for identifiers. This affects a number of things, but most importantly, identifiers can be used as variable names, and identifier names are valid unquoted property names. This post describes the observable changes compared to the old ES5 behavior.

Continue reading »


ES6 `const` is not about immutability

Written by Mathias Bynens - Published on Mathias Bynens
Aggregated on Thursday February 4, 2016 - Permalink

This seems to be a very common misconception that just won’t die. I keep running into it in blog posts, Twitter discussions, and even books.

Continue reading »


Unicode property escapes in JavaScript regular expressions

Written by Mathias Bynens - Published on Mathias Bynens
Aggregated on Sunday June 12, 2016 - Permalink

There is a proposal to add support for Unicode property escapes of the form \p{…} and \P{…} to JavaScript regular expressions. This article explains what Unicode property escapes are, how they work, and why they’re useful.

Continue reading »


ECMAScript regular expressions are getting better!

Written by Mathias Bynens - Published on Mathias Bynens
Aggregated on Wednesday January 25, 2017 - Permalink

This article highlights what’s happening in the world of JavaScript regular expressions right now. Spoiler: it’s quite a lot — there are more RegExp-related proposals currently advancing through the TC39 standardization process than there have been updates to RegExp in the history of ECMAScript!

Continue reading »