ecma262 icon indicating copy to clipboard operation
ecma262 copied to clipboard

Request: Shortcut for declaring an ES6 fat arrow function that doesn't take parameters.

Open ozzie1998 opened this issue 8 years ago • 2 comments

Declaring an ES6 Fat arrow function is like so:

let example = () => {/*Blah*/}

It would be handy to be able to declare an ES6 Fat Arrow Function that doesn't take any parameters like so:

let example => {/*blah*/}

The main problem with this would be that this isn't immediately obvious as a function.

Advantages of a shorter Fat Arrow function declaration for a function that doesn't take any arguments:

  1. Less to type
  2. Makes writing callbacks easier

ozzie1998 avatar Jul 14 '18 11:07 ozzie1998

seems more confusing than useful. adding too much syntax has a strain on people writing the language.

devsnek avatar Jul 14 '18 11:07 devsnek

Please see Contributing to ECMAScript for the most up-to-date information on contributing proposals to this standard.

ljharb avatar Jul 14 '18 14:07 ljharb