Hierarchical data modeling

Concerning Updating nested records, again.

Whenever I see multiple dots being used to access anything, methods nested deeply in an object hierarchy or fields nested deeply in a record or JavaScript object, I recall the Law of Demeter (video). It suggests a code smell in ALL languages, JavaScript, Go, Scheme, no matter how easy they make it to do.

That said, it doesn’t mean don’t do it, it just means that as the code size grows your application could become more difficult to maintain. You just have to decide on the tradeoffs you want to make.