The unreasonable effectiveness of declarative programming
You should look at Actions in the Python implementation of Cocos2d. It uses operator overloading to allow '+' for sequential actions and '|' for parallel actions. These are composable and reversible for quickly creating complex animations.<p><a href="http://python.cocos2d.org/doc/programming_guide/actions.html" rel="nofollow">http://python.cocos2d.org/doc/programming_guide/actions.html</a><p>Example:<p><pre><code>        bounce = Jump(150, 0, 4, 2)
        scale = ScaleBy(2, duration=1.5)
        rot = RotateBy(360, 0.80)
        scale_and_rot = scale | rot
        bounce_in = bounce | scale_and_rot
        bounce_out = Reverse(bounce_in)

        logo.do(bounce_in + bounce_out)</code></pre>