Hacker News new | ask | show | jobs
by wolco 2949 days ago
We shouldn't go too far with this line of thinking either.

When things are immutable design early.

Consider an api. You can build a basic api without a version parameter when you release. When you need to change the api and keep backwards compability you introduce a version parameter. You are forever stuck with the first version being the default.

2 comments

Whatever version is in the documentation people read is the default. If it's not compatible to use v2 when expecting results from v1, you can't change the behavior for no version specified anyway.

More important for an API is building in a way to signal users that the version they're using will be or has been discontinued, and a way for the users to test that.

Versions, timestamps and unique IDs are definitely base design requirements on anything.