News for hackers. Stuff that matters.
Re:Implement arrow functions in v8 by AshleysBrain on Thursday June 18, 2015 @12:39PM (#9739810)
Who on earth would really write that? Surely you'd use the optional braces to make it clearer:

    a => { return b <= 7; }
Sure you can write it without that, but only if you want to write willfully unclear code to annoy people, like writing an entire function body on one line. Just because you can do that doesn't mean that functions are inherently unclear.
Re:Implement arrow functions in v8 by ajanuary on Thursday June 18, 2015 @01:13PM (#9740117)
More who on earth would really write a function that took a named argument, ignored it, and compared a value in the outer scope.

All of the examples that look confusing are artificially simple and doing things you wouldn't normally try to do.

Re:Implement arrow functions in v8 by andrewstuart2 on Thursday June 18, 2015 @12:58PM (#9739982)
Well, anybody who wants to use lambdas I'd imagine.

If you're going to write it out, you might as well just add the `function` keyword for clarity because you're not saving a ton of keystrokes.

    function(a) { return b <= 7; }
Re:Implement arrow functions in v8 by danbruc on Thursday June 18, 2015 @01:26PM (#9740233)
Just make it a => (a <= 7), that is perfectly fine for me. (I replaced the b with an a, otherwise it looks pretty pointless or maybe a strange closure hack.)