I understand the allure of the GPL. “I’ve put this thing out there for free, and so I should benefit from the changes other people made!” (I’m ignoring the “software should be free” philosophical argument for now.) I think it’s a mistake to think that just because something is released under a liberal license, like the MIT license which is what I use, that companies won’t contribute their changes back to the project.
Creating a fork of a project is a pain. You have to reintegrate changes every time there are improvements in the core project that you want to take. For a company to maintain their own internal version of your project effectively means that they have their own fork of it. That just doesn’t make good business sense. A company could choose to take your project and produce some spiffy commercial version. Odds are, though, that they’d still release changes to the core system back to the project, rather than maintaining a private fork.
I think that most people who choose the GPL for a library do so because it’s a license they’re familiar with. That’s the point of this post: hopefully, more people creating libraries will recognize that a very liberal license like MIT or BSD is the way to win users. The authors of both of the projects that I mention above have agreed to relicense under MIT-style licenses!
I should also point out that the LGPL is somewhat ambiguous when it comes to dynamic languages. If you really want a license that requires the open source release of changes on a library that you’re releasing, you should think about the Mozilla Public License. (Update: The CDDL appears to be a version of the MPL that is designed to be more easily reused. That’s a good one to consider.) That license is not vague: only the files in your distribution are required to remain under the MPL. So, the code is free to use for commercial purposes, but any changes to the files that you distributed also need to be released under the MPL. I’d still recommend going with an MIT license in general, but at least the MPL is clear in its effects.
By the way, I have no problem with using the GPL for applications. Applications released under the GPL can be used for all kinds of purposes, and it’s reasonable to want changes to the application to be similarly licensed.
Update: I eliminated the use of the word “viral” above, because I didn’t intend to make a negative point on the use of licenses that impose restrictions on distributed versions of software. My point is that many choose these licenses without being fully aware of the ramifications.
It is also clear from the comments that I never got back to the “software should be Free” (software libre) argument.
As mentioned in the comments, not everyone is looking for the broadest possible adoption of their code. Some people specifically have the belief that all software should be free to use, upgrade and share. People are certainly free to have and exercise that belief by licensing their software under the GPL. If I asked someone to relicense and they told me that they chose GPL to ensure freedom of the software, I wouldn’t argue any further. Those people have chosen the GPL for the right reasons.
The fact that I have spoken with two people in the past two weeks who relicensed their software shows that there are people out there choosing the GPL for reasons other than support of software libre.