Thank you for the interesting post. Can you explain why the "A complex animation" code example is declarative?
I can see that the names of the functions are declarative in style but the code is a series of function calls that seem to be giving instructions to the javascript interpreter to perform a sequence of operations. For example, you describe the code as follows:
1. anim_const(name, val) to set a constant value val to name name.
2. anim_interpolated(ease, name, val, time) to change to a named value with name
name to value val in duration time.
3. anim1.seq(anim2) to run anim2 once anim1 has completed.
4. anim1.par(anim2) to run anim2 in parallel with anim1.
5. anim_delay(time) to do nothing for time time.
All these function calls are described by verbs like "set a ... value", "change to a ... value", "run", "do" etc. The way I understand declarative programming (I do most of my coding in Prolog these days) it means that one declares what is the state of the progam, rather than describing what steps should be taken to change it. But your code seems to be describing steps to change the state of the program. It is "do this, then do that" style of coding.
Do you mean something else by "declarative"? Could you say what you mean by "declarative"?