4 replies
June 2019

disqus_vdlj677W40

Maybe we should look out for a better name. The term “contract” suggests too much obligation and too little space for negotiation.

1 reply
June 2019 ▶ disqus_vdlj677W40

jbrains

Maybe. I don't think the term is the problem, because even legal contracts are just understandings of agreements combined with an agreement for how to settle violations.

If we value working agrémentsp over contracts, then maybe what we have are working agreements between components. Slightly different nuance of "working".

June 2019

disqus_k0CCGcPqNQ

I'm happy with the strongest interpretation of the term contract.... the penalties for violating the contract are _always_ harsh, immediate, require no enforcement and no higher court will change that.

Your code just plain won't work properly.

I'd merely add that the contract is _always_ open for renegotiation by _all_ parties involved.

And that's the tricky bit. The "_all_ parties involved".

To change the contract you have to get every client and every implementation on board to agree to (and implement at the same time) the changes.

Which is where one starts talking about Open Closed and the Interface Segregation Principles.

That said, usually the refactoring that results in most lines of code deleted (across the whole system), arises from a subtle renegotiation of a contract.

1 reply
June 2019 ▶ disqus_k0CCGcPqNQ

jbrains

This matches very well how I feel about it. I have only one reason to explain why I feel comfortable with this and others don't: I learned early in life that a contract is always open for negotiation, while other people probably persist in the delusion that a contract is inviolate and that breaking it is always criminal behavior. Too many crime dramas and not enough real-life contract negotiation, maybe?