Jul 21, 2022
"Your article only focuses on object types that can't be different and that are under control of the project"
yes. you are right
(obj?.prop?.subProp?.method ?? () => {})()
is not better than:
obj.subPropMethod()
the above violates demeter' law and has nulls.
Therefore is worse than the latter, IMHO