Hacker News new | ask | show | jobs
by jstarks 1072 days ago
If looking at types is the least useful way to enforce versioning, then what are _any_ better ways?
2 comments

Do not strictly enforce versioning (still publish guidelines and make tools though). Allow third parties to publish adaptors between different versions instead. The correctness of adaptor can be verified to varying extent in many ways.

People seem to give too much weight to versioning, but it's just a means to communication. Like any other communication mechanism, it's subject to error which should be somehow detected and/or corrected. And versioning only concerns with detection---it doesn't say what you should do when a breaking change is dropped! Focusing to the error correction is more sustainable and user-friendly.

Consumer Driven Contracts is one way https://martinfowler.com/articles/consumerDrivenContracts.ht... (implemented in pact for example).