Why I use the MPL 2.0 software license

When I release software, I generally categorize it according to how I care about its use. Example code or anything small (e.g., an iterator implementation I send to someone in a chat or forum) gets a permissive license; the MIT is my go-to here.

When I care about something though, I apply the MPL 2.0 license. For a very quick summary, the MPL is like the GPL licenses except that it applies at the file boundary rather than the link boundary. Why don't I use the GPL, since it's better-known?

If I distribute the source code to something, I want to know that anyone else that distributes it also makes the source available. If you improve my software, I'd like to see the improved code -- but your users need to be able to see it. This is important. One of the biggest problems with the current software landscape is that programmers (and the corporations paying their salaries) have forgotten that the software they build isn't about them. It's about the people using their software to (at least in an ideal world) make their lives better in some way. Proprietary licenses restrict the rights of their users (generally reducing them as close as they can to "you have the same rights as the ants crawling across the sidewalks outside our offices") but open source licenses give their users real rights. The same is true for free software.

Both the MPL and GPL enforce this preservation of rights. Permissive licenses don't (see, for example, MongoDB and Elasticsearch).

Although I care about the code I write, I have no right to tell you what to do with yours. This is where the GPL fails. If you want to use my library in your closed-source application, go for it. But you've got to honor the work I've done and preserve the same rights to your users that I've given you. And perhaps, think a bit about the way your proprietary license treats them. All proprietary licenses are not equal (take a look at MariaDB).

Advantages to the GPL

I think since I've clearly stated my preference for the MPL, I should mention an important advantage that the GPL has over it -- in some cases, it's more difficult for someone to work around the GPL to avoid sharing their code modifications.

If I write an MPL library in a traditional OOP manner, and you want to extend it for your closed-source application, you can simply subclass my classes (or write a wrapper in non-OOP code) in separate files and distribute your extensions as closed-source software. You have effectively modified and improved my code, but bypassed the requirement to share your modifications. The GPL protects against this much better.

In reality, such an action will likely cause you pain; you now have important logic in multiple locations and you have to deal with merging patches anytime you upgrade my library. You're probably better off sharing your work.

In my opinion, someone that seeks to find and exploit loopholes to get around license restrictions is probably also willing to violate them outright. After all, I'm unlikely to ever know if you simply take my code and distribute it in violation of the license. No license can fully protect me against such people, so I've chosen to simply not give them a moment of my time. They're simply not worth it.