▲ | Groxx 4 days ago | |
I've also generally found that separating the types passively reminds people that they are not forced to keep those types the same. Whenever I've been in codebases with externally-controlled types as their internal types, almost every single design that goes into the project is based around those types and whatever they efficiently model. It leads to much worse API design, both externally and internally, because it's based on what they have rather than what they want. |