I think that the chaining operator is a patch when you're not satisfying the law of demeter.
My post about Demeter's law on Dev.to (dev.to/carlillo/demeters-law-dont-...).
What do you think about that?
Yes, I'm on your side here!
the ?. is a patch around bad object and API design.
Having this deeply coupled and tightly integrated objects is never a good thing.
The problem is that you can not always control what data you are getting.
Another problem is that NoSQL databases promote deeply nested objects and then they don't provide any schema mechanisms. This was always a strange thing coming from SQL where Schemas were the norm.
But yeah nice article!
Thanks for your opinion 😊
Your welcome 😀👍
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.