Greg Pabian
Apr 29, 2024

--

The naming boils down to a convention, the underscore is not always a semantic separator, thought it is often used as one.

The idea behind the example was to show that even though you might want to extract address properties under a common subtype, you might reconsider. If you will not reuse a subtype, such a move adds complexity for copying, creation of new objects and reading due to indentation. I think it's more obvious if the types have couple of nested structures, then it's hard to immediately know what's inside.

--

--

Greg Pabian
Greg Pabian

Written by Greg Pabian

A Full-stack Software Engineer that loves building products. Disclaimer: https://gist.github.com/grzpab/3cf57878ffce7d5271298ccc473bcb98

Responses (1)