▲ | the_gipsy 6 hours ago | ||||||||||||||||
No, I cannot agree that this would be called the consumer. Yes, you have technically moved the interface type away from the implementation, but just for the sake of it, without any other upsides. The consumer is still the package that is using and importing this interface type, just from another package now. | |||||||||||||||||
▲ | 9rx 2 hours ago | parent [-] | ||||||||||||||||
That is the beauty of engineering: There is no universal truth, just different tradeoffs. Meaning that you don't need to agree, nor should you even seek agreement. You can and should forge your own path if different tradeoffs are warranted for your unique needs. But, this is the "idiomatic" approach. The upside is consistency for future readers. Code is for humans to read, after all. Most codebases follow this pattern, so it will be familiar when the next person encounters it. If you have a reason to do things differently, go for it. Nobody knows your problem better than you, so you cannot listen to others anyway. I am quite curious about what you see in the different tradeoffs you are accepting, though! What has you weighing them in favour? | |||||||||||||||||
|