Re:Show HN: We wrote a book about building business applicat...
by bndw on Thursday May 13, 2021 @12:01PM
(#27143653)
In my experience, I've found the lack of polymorphism to be the larger challenge in building complex business systems in Go.
Managing a bunch of polymorphic entities in Go often requires implementing a bunch of interfaces in various types. You then have to write a bunch of mapping logic for every type, driven by type assertions. Apply this in a large codebase that encapsulates transport, data access, and so on and you end up with a ton of complexity.
Managing a bunch of polymorphic entities in Go often requires implementing a bunch of interfaces in various types. You then have to write a bunch of mapping logic for every type, driven by type assertions. Apply this in a large codebase that encapsulates transport, data access, and so on and you end up with a ton of complexity.