Hacker News new | ask | show | jobs
by sftrabbit 4086 days ago
The samples are all very short and generic, so I'm not sure how legal significance a copyright license will have. However, I do plan to add a license to the repository if only to make it clearer.

Is CC0 appropriate for code? I was thinking of going with MIT, but that would require retaining the license in any derivative works. Anybody have thoughts on this matter?

2 comments

FSF recommends CC0 for small code snippets in documentation:

https://www.gnu.org/licenses/license-recommendations.html#do...

A single, trivial code snippet may not carry a copyright at all.

But a whole collection of such snippets will fall under copyright, even if each individual bit alone wouldn't qualify.

So it is important to make the licensing explicit here. CC0 / Public Domain is a natural choice, given that the code snippets are meant to be used individually and that no "real" license would make any sense on individual code snippets.