kbroman / pkg_primer

R package primer: a minimal tutorial on writing R packages
https://kbroman.org/pkg_primer
Other
92 stars 48 forks source link

Error about the CC0 license and recommendation of the Apache 2.0 license #16

Closed mingcenwei closed 1 month ago

mingcenwei commented 1 month ago

On the Software licenses page of the tutorial, it states:

But in some states (e.g., Maryland, I think), software is treated as a “good” (like a car), and so if your code causes something terrible to happen, you could be sued for damages.

This is incorrect. The CC0 description page, linked in the same section, clearly states:

Unless expressly stated otherwise, the person who associated a work with this deed makes no warranties about the work, and disclaims liability for all uses of the work, to the fullest extent permitted by applicable law.

Therefore, CC0 does include a disclaimer of warranties. The main reason CC0 should not be used for software is that it does not address patent issues.

According to the CC0 FAQ:

CC0 ... does not license or otherwise affect any patent rights you may have.

Additionally, FSF warns:

For works of software it is not recommended, as CC0 has a term expressly stating it does not grant you any patent licenses.

Because of this lack of patent grant, we encourage you to be careful about using software under this license; you should first consider whether the licensor might want to sue you for patent infringement. If the developer is refusing users patent licenses, the program is in effect a trap for users and users should avoid the program.

However, similarly, "the MIT license does not include an express patent license". FSF recommends the Apache 2.0 license over other permissive licenses like MIT:

The patent termination provision is a good thing, which is why we recommend the Apache 2.0 license for substantial programs over other lax permissive licenses.

Moreover:

If you are set on a lax permissive license for one, we recommend the Apache 2.0 license since it protects users from patent treachery.

kbroman commented 1 month ago

Thanks for correcting me on CC0. I've revised that section.

I'll study the business about patents, but at this point I don't want to make a big change and recommend the Apache license rather than the MIT. I like that the MIT license is just two paragraphs.