I see declarative as a spectrum. Fluent style is probably still close to imperative but is a step in the direction of declarative. To me, this library looks like functional reactive programming but domain specific. It’s not uncommon for people to view functional reactive as being closer to declarative. What puts it in that category is that some control flow is abstracted away and it seems like the functions are referentially transparent.
I too find the post a bit strange and unorganized. The following passage is repeated twice for some reason:
As hinted above, since our specification of the animation was entirely declarative, it can’t really “do anything else” like manipulate the DOM. This gives us fantastic debugging and editing capabilities. As it’s “just” a mathematical function:
this seems to be a so called ‘fluent style’ api that sets initial ‘configuration’ parameters. What makes it ‘declarative’?
I see declarative as a spectrum. Fluent style is probably still close to imperative but is a step in the direction of declarative. To me, this library looks like functional reactive programming but domain specific. It’s not uncommon for people to view functional reactive as being closer to declarative. What puts it in that category is that some control flow is abstracted away and it seems like the functions are referentially transparent.
You may be interested in the famous Van Roy’s organization of programming paradigms: https://www.info.ucl.ac.be/~pvr/VanRoyChapter.pdf. Original graphical summary: https://continuousdevelopment.files.wordpress.com/2010/02/paradigms.jpg, revised summary: https://upload.wikimedia.org/wikipedia/commons/f/f7/Programming_paradigms.svg.
It is definitely a spectrum, but a multi-dimensional one. :)
I too find the post a bit strange and unorganized. The following passage is repeated twice for some reason:
Suggest ‘graphics’. The tag ‘programming’ is redundant here – it’s intended for when no other tag applies.