DEV Community

John Kazer
John Kazer

Posted on

2

Reusable code (tick), backwards compatibility (fail)

When I was a lad, starting out in development (COM, C++, DLLs etc for Windows), we never broke an interface. That is, the latest version of a module would always support every previous API (interface) version.

However code reuse was really hard. DLLs were rarely actually reused for other projects.

Nowadays with this new web stuff it all seems to be the other way round. Reuse is everywhere but interface updates often break old code. Old code is stuck using the original reused files.

This seems wrong to me. A major version of a package shouldn't break old code. It should just offer a new API with the old stuff in parallel.

Am I missing something?

Top comments (1)

Collapse
 
ben profile image
Ben Halpern

The rise of the web and platforms like GitHub make it a bit more reasonable to break interfaces I think. The word should get out quickly enough. Backwards compatibility is big burden for software to maintain.

That being said, I think it does go to far in the JavaScript community. I’m not sure what the answer is, but the pendulum does seem way to far in the direction of being cool with breaking interfaces.

SurveyJS custom survey software

JavaScript UI Libraries for Surveys and Forms

SurveyJS lets you build a JSON-based form management system that integrates with any backend, giving you full control over your data and no user limits. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay