1. 12
    1. 6

      this seems to be a so called ‘fluent style’ api that sets initial ‘configuration’ parameters. What makes it ‘declarative’?

      1. 3

        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.

        1. 4

          I see declarative as a spectrum

          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. :)

      2. 1

        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:

        2: anim_circle: (t:Time) -> (cx: float, cr: float)
    2. 1

      Suggest ‘graphics’. The tag ‘programming’ is redundant here – it’s intended for when no other tag applies.