4 ms·
I think that your code examples are not (and should not be) copyrightable. Quoting US copyright law (but the same principle is global) "In no case does copyrig
by PeterisP 4y ago
I think that your code examples are not (and should not be) copyrightable.
Quoting US copyright law (but the same principle is global) "In no case does copyright protection for an original work of authorship extend to any idea, procedure, process, system, method of operation, concept, principle, or discovery, regardless of the form in which it is described, explained, illustrated, or embodied in such work." - when a work combines an idea and its expression, copyright protects only the expression but not the idea itself, no matter how clever or valuable it is. Copyright does not prohibit others to freely copy the method/process/system/etc expressed in the copyrighted work.
Also, there is a general rule of thumb (established in law and precedent) in copyrightability that functionally required aspects can not be copyrighted - in essence, if you create a new, optimized routine that's superior to everything else, then only the "arbitrary" free, creative parts of that code are copyrightable, but you absolutely can't get an exclusive right to that algorithm or technique. If the way you wrote it is the only way to write it, that can't be protected; and if not, others must be able to write stuff that's functionally the same (i.e. gets all the same performance boosts) and varies only in the functionally irrelevant parts. That's one of the reasons, for example, for recipe sites having all that fluff - because you can't get copyright protection on the functional part of the recipe, or some technique in another domain like architecture or computer science. Perhaps you can get a patent on that, but copyright is not applicable for that goal.
So, going back to your examples:
People reimplementing that "smarter-than-it-probably-should state management in just a handful of LOCs" is absolutely permitted by copyright law. If the same state management can be written in many different ways, then copying your code would be a violation and they would have to reimplement the same idea in different words, but copyright law definitely allows them to copy and reuse your idea without your permission, it doesn't protect the idea, only its specific expression.
Hand-optimized graphics routines may fall into the area where there is only one possible expression for that idea which implements the same method with the same efficiency. If that happens to be the case, the routine is not eligible for copyright protection at all - you can't get a monopoly on a particular effective technique or method using copyright law; patent law covers the cases in which that can or can't be done.
For APL implementations of algorithms - again, the key principle is that copyright definitely allows others to implement the same algorithm. If an obvious reimplementation of the same algorithm results in the same terse APL code, then that's simply evidence that this particular APL code is solely the "idea" (unprotectable), not "creative expression" which would be eligible for copyright protection.