4 ms·
I was just going to post that. If that's what he means it's the opposite of what you should usually do; in that example you're making register_with_irs() depend
by sysop073 18y ago
I was just going to post that. If that's what he means it's the opposite of what you should usually do; in that example you're making register_with_irs() depend on the implementation of customer when it doesn't need to
- raganwald 18y agoAnd therein lies the trade-off. It may be that one day you need an address as well as an SSN to register an IRA. If you chose door A, you update the calling code to either pass both properties or pass a customer object. If you chose door B, you update the callee code to extract the address as well as the SSN. In one case we're arguing that the registration code shouldn't have to know how to work with a customer. In the other case we're arguing that code initiating a registration shouldn't have to know what the IRS wants from a customer. Seems like there's room for reasonable people to empty a bottle of single malt while debating the alternates.