2 ms·
You can of course create a User and a UserDetails, the former embedding the latter when necessary. I also see getting parse errors when APIs change as a positi
by boomlinde 9y ago
You can of course create a User and a UserDetails, the former embedding the latter when necessary.
I also see getting parse errors when APIs change as a positive thing. When you change an API, things do break. Learning what breaks as early as possible is good. It's not even about objects vs. dictionaries, you could use any structured composite datatype and the overhead you associate with it depends very much on the language.
Of course, for a quick hack I'd happily dump data into a dictionary and call it a day. But if I want to learn why it breaks 5 years later, having a clear specification of the expected data is much better even if it cost me an extra few hours.