News for hackers. Stuff that matters.
Re:What’s New in ES2019 by ptx on Tuesday July 30, 2019 @12:27PM (#20566424)
> arrow function notation

Arrow functions bind this to the lexical scope, which is useful. (In a regular function the value of this depends on how it's called.)

> python which was resistant to the idea of 20 ways to do the same thing

This was in comparison to Perl which intentionally has an unusual excess of different ways to do things.

> "walrus" operator

Simplifies a very common pattern.

  m = re.match(r"my_key = (.*)", text)
  if m:
      print(m.group(1))

There are no comments on this comment yet.