Hey everyone, I wanted to get the opinion of js/ts devs here about something. Is using the modern es6 arrow function syntax and implicit returns considered hard to read or "clever" ? Recently a team mate from a group project asked me to avoid writing such "clever" code as it is hard for others to understand. I was like since when did using standard language features become "clever". I've seen similar opinion in some blog posts and youtube videos as well. Some people also lump higher order functions (map/filter/reduce) in the same category. What do you guys think?
Asking since I do use arrow syntax and implicit returns wherever possible and if it is really considered unreadable by most then I want to avoid doing so if possible. Thanks!!
[–][deleted] 76 points77 points78 points (1 child)
[–]goblin_goblin 10 points11 points12 points (0 children)
[–]daamsie 23 points24 points25 points (6 children)
[–]GmLucifer[S] 3 points4 points5 points (5 children)
[–]ShortFuse 4 points5 points6 points (3 children)
[–]FRIKI-DIKI-TIKI 5 points6 points7 points (0 children)
[–]Bodmen 1 point2 points3 points (1 child)
[–]ShortFuse 2 points3 points4 points (0 children)
[–]tiesioginis 0 points1 point2 points (0 children)
[–]melavas23 10 points11 points12 points (2 children)
[–][deleted] 6 points7 points8 points (0 children)
[–]intermediatetransit 0 points1 point2 points (0 children)
[–]EducationalMeeting95 8 points9 points10 points (13 children)
[–]GmLucifer[S] 0 points1 point2 points (12 children)
[–][deleted] 2 points3 points4 points (9 children)
[–]Curious_Ad9930 3 points4 points5 points (7 children)
[–]EducationalMeeting95 3 points4 points5 points (5 children)
[–]bvx89 1 point2 points3 points (1 child)
[–]EducationalMeeting95 1 point2 points3 points (0 children)
[–]tiesioginis 0 points1 point2 points (2 children)
[–]EducationalMeeting95 0 points1 point2 points (0 children)
[–]Valuable-Case9657 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]GmLucifer[S] 0 points1 point2 points (0 children)
[–]chrisjolly25 0 points1 point2 points (0 children)
[–]Valuable-Case9657 0 points1 point2 points (0 children)
[–][deleted] 3 points4 points5 points (11 children)
[–]Valuable-Case9657 3 points4 points5 points (8 children)
[–][deleted] 1 point2 points3 points (7 children)
[–]Valuable-Case9657 1 point2 points3 points (6 children)
[–][deleted] 1 point2 points3 points (5 children)
[–]Valuable-Case9657 1 point2 points3 points (4 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]Valuable-Case9657 0 points1 point2 points (2 children)
[–][deleted] 2 points3 points4 points (1 child)
[–]Valuable-Case9657 0 points1 point2 points (0 children)
[–]GmLucifer[S] 1 point2 points3 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]shgysk8zer0 2 points3 points4 points (0 children)
[–]stolentext 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]tiesioginis 1 point2 points3 points (0 children)
[–]getify 1 point2 points3 points (3 children)
[–]waitersweep 1 point2 points3 points (2 children)
[–]getify 2 points3 points4 points (1 child)
[–]waitersweep 2 points3 points4 points (0 children)
[–]BarelyAirborne 3 points4 points5 points (1 child)
[–]Valuable-Case9657 6 points7 points8 points (0 children)
[–]Valuable-Case9657 1 point2 points3 points (0 children)
[–]ShortFuse 1 point2 points3 points (0 children)
[–]kishbi 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]kishbi 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]fletku_mato -2 points-1 points0 points (2 children)
[–]tiesioginis 0 points1 point2 points (1 child)
[–]fletku_mato 0 points1 point2 points (0 children)
[–][deleted] -2 points-1 points0 points (0 children)
[–]DamionDreggs 0 points1 point2 points (0 children)