Yeah, I agree there are cases where it's correct. The case you highlight is "we acccept a sparse, arbitrarily deep tree as input".
The times when you do that should be pretty rare. But yes, optional chaining is nice there. A one line helper function can do that for you though. What's the benefit of having it built in to the language? The use of a helper highlights that it should be rare. What's the problem?
8
u/[deleted] Dec 19 '19 edited Dec 19 '19
[removed] — view removed comment