
Familiarity Bias Is Holding You Back: It's Time to Embrace Arrow Functions - ericelliott
https://medium.com/javascript-scene/familiarity-bias-is-holding-you-back-its-time-to-embrace-arrow-functions-3d37e1a9bb75
======
powera
This guy is incredibly sanctimonious, but he misses the biggest problem with
his notation. Not all the operators he uses are associative.

    
    
      const secret = msg => () => msg;
    

This technically parses uniquely, but it's not at all obvious what the parse
structure is. Writing it with the squiggly brackets makes it clearly parsable.

    
    
      const secret = { msg => { () => msg } };

~~~
ericelliott
I'm not sure what you're trying to express. The "squiggly brackets" example is
not valid JavaScript.

If you need to disambiguate associativity, you need to wrap with parentheses:

    
    
        const secret = msg => ( () => msg );
    
    

But in this case, it's not required, because the alternative doesn't make
sense:

    
    
        const secret = (msg => ()) => msg;
                                ^ Unexpected token

------
Safety1stClyde
The interesting bit seems to be the "premium content".

