docopt.rs is dual-licensed under the MIT and Unlicense.
How can the software be both copyrighted and in the public domain? Is this an example of invalid licensing?
docopt.rs is dual-licensed under the MIT and Unlicense.
How can the software be both copyrighted and in the public domain? Is this an example of invalid licensing?
Firstly, no it's not invalid at all. It's always valid to dual or multi license a product under many licenses, even completely contradictory licenses. When you dual license something the recipients get to choose which license they will accept the work under. They only choose one, so it doesn't matter if another license would give them contradictory rights.
The authors of docopt.rs have probably done this because in some jurisdictions it is difficult or perhaps even impossible to put a work in the public domain. By dual licensing with the very permissive MIT license they solve that problem by providing a license which is valid everywhere. If you are somewhere where public domain dedications are questionable, or if your company's lawyers are uncomfortable with you using something published under the Unlicense, then you can use the safe option of the MIT instead.
When you are the original creator of a piece of copyrighted work, whether this is a book or code, then you can release that under as many licenses as you desire. It may not make much business sense, but as the copyright holder you have that right.
This happens all the time. For example a photo that is exclusively licensed by a newspaper for a certain number of weeks. Then again sold after that period to many magazines at the same time, and lastly followed by releasing it in the public domain when it's commercial value has dwindled but it's use by others may have marketing value.
Three times the same object is made available under different contract terms/ license.