Hacker News new | ask | show | jobs
by munificent 410 days ago
It's true that if you always add new functions to your library instead of changing existing ones then users can upgrade without breaking. There is real value in that.

But woe unto the user who first starts using your library after a decade of that "evolution" and they are faced with a dozen functions that all have similar but increasingly long names and do very similar things with subtle but likely important differences. (I guess a culture of "the longest function name is probably the newest and the one you want" will emerge eventually.)

Personally, I like when a library's API represents the best way the author knows to tackle a given problem today without also containing an accumulated pile of how they thought the problem should have been tackled years ago before they knew better.

If I want the old solutions, that's what versioning is for. I'll use the old version.

3 comments

> If I want the old solutions, that's what versioning is for. I'll use the old version.

And you'll miss all the stuff you do not want the old solution for. And all the old bugs

> faced with a dozen functions that all have similar but increasingly long names and do very similar things with subtle but likely important differences.

Unless all the old versions are marked add old/deprecated and can be hidden from your view. Then you only care about the old stuff if you used it before and don't want to change

Agreed. Create a new library if there’s truly a better way. That does seem to be what happens in Clojure from what I’ve seen.
It's no wonder that newcomers to Win32 find it intimidating.
And C++ for that matter.