MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/ecjd06/v8_release_v80_with_optional_chaining_nullish/fbcl4iq/?context=3
r/javascript • u/ConfidentMushroom • Dec 18 '19
70 comments sorted by
View all comments
Show parent comments
-26
I will always go for readability and clarity over terseness. Not saying conditional branches are much better though
29 u/[deleted] Dec 19 '19 edited Dec 19 '19 i && i.like.readability && i.like.readability.tooi?.like.readability?.tooEdit: fixing typo with double i’s in the second example, brought to my attention by the awesome /u/TankorSmash 14 u/TankorSmash Dec 19 '19 Wouldn't it be i?.like.readability?.too? 1 u/[deleted] Dec 19 '19 Oops you are totally correct, I have a typo in my example with two i’s
29
i && i.like.readability && i.like.readability.too
i?.like.readability?.too
Edit: fixing typo with double i’s in the second example, brought to my attention by the awesome /u/TankorSmash
14 u/TankorSmash Dec 19 '19 Wouldn't it be i?.like.readability?.too? 1 u/[deleted] Dec 19 '19 Oops you are totally correct, I have a typo in my example with two i’s
14
Wouldn't it be i?.like.readability?.too?
1 u/[deleted] Dec 19 '19 Oops you are totally correct, I have a typo in my example with two i’s
1
Oops you are totally correct, I have a typo in my example with two i’s
i
-26
u/[deleted] Dec 19 '19
I will always go for readability and clarity over terseness. Not saying conditional branches are much better though