So I've been reading through the new copyright directive proposal and saw the pastiche exemption.
So take this hypothetical:
I forgot how anime.js worked to animate something.
I find a piece of example code on Stack Overflow that shows how it works to initalize it and to animate something to the left and then fade away
I write my own implementation without copying the original code in my codebase, that does a different animation, move to the bottom and fade in, inspired by the code example on Stack Overflow.
Would that be a pastiche? Or would that still fill under CC-BY-SA 3.0 because I took a work for inspiration, not copied it though, but created my own example inspired by that code, and am required to follow all requirements of the CC-BY-SA license?
The only references to pastiche I've been able to find have dealt with an artist reusing work for comedic or entertainment purposes from Britisch guidelines.
Miriam webster defines it as: a literary, artistic, musical, or architectural work that imitates the style of previous work.
Code is a literary work in my opinion. You write words in a document in a grammatically defined language, so theoretically with my interpretation, basing code upon someone elses code could interpret that as a pastiche.
I'm mostly curious because of this part from the final text of the former article 13 text:
http://www.europarl.europa.eu/doceo/document/A-8-2018-0245-AM-271-271_EN.pdf
The cooperation between online content-sharing service providers and rightholders shall not result in the prevention of the availability of works or other subject matter uploaded by users, which do not infringe copyright and related rights, including where such works or other subject matter are covered by an exception or limitation.
Member States shall ensure that users in each Member State are able to rely on any of the following existing exceptions or limitations when uploading and making available content generated by users on online content-sharing services:
(a) quotation, criticism, review
(b) use for the purpose of caricature, parody or pastiche
Answers relevant to the European Union please, and i'm mostly interested if there are actual precedents for these "outlier" cases?