I think, you're both right. :)I have a similar experience of migrating a large Java application through changes of versions of Jetty from 6th to 9th, and it was much less painful when the namespaces were changed (between v. 6 and 7 if I'm not mistaken) for the points mentioned by Anton. So I think, it indeed makes sense to create, say, hunchentoot2 if there's going to be again a serious incompatible API change, like the transfer from 0.X to 1.X. (But a transfer from 0.X to 1.X is an exception here, because it is assumed that until v.1 the software is not stable).At the same time, if you make a small "local" API change, it often doesn't justify creating a new package & system, because there will be more total inconvenience for those who aren't affected (the majority) to migrate to the new version than for those who are affected to change their code.So it all just boils down to common senses, some level of discipline and the amount of change some system really needs to go through intrinsically. My guess is that for the vast majority of libraries such dramatic version transitions may happen once in several years, and it totally makes sense for me to do a new namespace/system for that.Best regards,---Vsevolod Dyomkin+38-096-111-41-56skype, twitter: vselovedOn Wed, Nov 20, 2013 at 2:50 PM, Anton Vodonosov <avodonosov@yandex.ru> wrote:
19.11.2013, 23:41, "Robert P. Goldman" <rpgoldman@sift.info>:
> it's too radical
It's not radical, actually my proposal is very similar to yours
Yes, I see this as an FP analogy too and expect that avoiding
> It's like having a purely functional programming language
mutations and destructive changes will simplify life
for developers.
> with no garbage-collection!
Why without garbage-collection? We are not leaking any resources.
The amount of library versions does not change in the approach
> We'd be left with heaps of unmaintained and unmaintainable
> versions of basic-lib floating around in the worse case.
I propose. But versions with different APIs are have different names.
And we deal only with versions we use, and can forget about any
other versions.
Wait, I do propose to change package
> Also, the two different libraries won't live happily in the same lisp
> image, unless they change package
> at every release
at every API incompatible change (in other words, for every new API).
What pain do you mean? It's a zero cost solution. It requires no
> This approach seems like it will be such a monumental pain for the
> library maintainers,
additional efforts from library maintainer, and even no special
support from ASDF and other tools.
The client job remains the same: if he wants to migrate to
> and anyone who wishes to upgrade his/her client program
> from basic-lib to basic-lib2
the new API he rewrites parts of his code using new functions.
Nothing above that.
Moreover, as client can have access to both APIs simultaneously,
he can sometimes migrate partially: leave his old tested code
as is (using basic-lib), but in the places where he needs
new functionality he calls basic-lib2.
So, client can benefit from new features without investing
efforts into rewriting and retesting code.
It's not a target. The target is to not break clients.
> I'd argue that having two versions of the same library *in the same
> image* is too demanding a target.
It's rather a tool to achieve this target, or a pleasant side-product
of a cheap decision to name different things differently.
Please think about this approach a little more.
IMHO this approach is convenient and I would recommend
it as the first thing to consider to anyone who is going
to change API of a public library.
Am I missing anything?
Best regards,
- Anton