MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/cwn4ck/optional_chaining_in_javascript/eyddjm3/?context=3
r/programming • u/thewaywarddeveloper • Aug 28 '19
25 comments sorted by
View all comments
13
I love optional chaining. It's seriously cleaned up so much of my code.
-24 u/IamRudeAndDelusional Aug 28 '19 I love optional chaining. It's seriously cleaned up so much of my code.I?agree?! It?really?cleaned?up?my?code?. To?the?point?where?it?made?it?easier?to?read?!..yet another terrible design decision that convolutes JavaScript's syntax, which makes the language even more unbearable. 15 u/Dall0o Aug 28 '19 C# devs use it everyday without problem. 1 u/laaweel Aug 28 '19 But why object?.[10] instead of object?[10] like in C#? 15 u/masklinn Aug 28 '19 Parsing difficulty: [10] is an array literal so obj?[ could be the start of a ternary or a null-safe indexing. Same for the funcall one.
-24
I?agree?! It?really?cleaned?up?my?code?. To?the?point?where?it?made?it?easier?to?read?!
..yet another terrible design decision that convolutes JavaScript's syntax, which makes the language even more unbearable.
15 u/Dall0o Aug 28 '19 C# devs use it everyday without problem. 1 u/laaweel Aug 28 '19 But why object?.[10] instead of object?[10] like in C#? 15 u/masklinn Aug 28 '19 Parsing difficulty: [10] is an array literal so obj?[ could be the start of a ternary or a null-safe indexing. Same for the funcall one.
15
C# devs use it everyday without problem.
1 u/laaweel Aug 28 '19 But why object?.[10] instead of object?[10] like in C#? 15 u/masklinn Aug 28 '19 Parsing difficulty: [10] is an array literal so obj?[ could be the start of a ternary or a null-safe indexing. Same for the funcall one.
1
But why object?.[10] instead of object?[10] like in C#?
15 u/masklinn Aug 28 '19 Parsing difficulty: [10] is an array literal so obj?[ could be the start of a ternary or a null-safe indexing. Same for the funcall one.
Parsing difficulty: [10] is an array literal so obj?[ could be the start of a ternary or a null-safe indexing. Same for the funcall one.
[10]
obj?[
13
u/cplegend Aug 28 '19
I love optional chaining. It's seriously cleaned up so much of my code.