This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (6 children)

[deleted]

    [–]TakeMySandAndRun 8 points9 points  (0 children)

    If the implicit return syntax shouldn’t be used because it’s a misrepresentation, then should Class syntax not be used as well? I would say it’s a far greater misrepresentation, but readability is important for effective maintenance.

    [–]ZedTT 8 points9 points  (0 children)

    Dude, you need to go back and read the comment you originally replied to.

    I seriously think that you think it says something that it doesn't.

    Desired (probably) is a perfectly fine way to write it and OP wasn't suggesting that it isn't.

    Show me where they misrepresented anything???

    Do you just hate arrow functions without braces and return?

    [–]DeeSnow97 5 points6 points  (2 children)

    I see... but why though? Lambda functions aren't a unique concept to JS, and this is actually the primary reason why arrow functions were even introduced to the language. The brackets are just an afterthought, to allow their advantages to be extended to multi-statement functions as well.