The :hoplon: ClojureScript Web Framework - http://hoplon.io/
ntzanos 2018-01-22T08:02:49.000079Z

@thedavidmeister Thanks a million! I did something similar to that 🙂




@thedavidmeister Thanks for the Hickey! So using comp creates the transducer? Specter does something similar to transducers, skipping intermediate reifications in the transformation, so I can probably start with that. So to re-sate, I might see some performance benefits by doing all my list modifications in one (transduced) function, rather than streaming the list through a series of modifying formula cells?


And I understand there is some magic of structural sharing at the Closure data level when creating n modified-lists from the original. But when rendering those modified-lists via a formula cell in the old for-tple, is there any sharing going on at the DOM level, or just simply n independent sets of DOM nodes in the cache?

flyboarder 2018-01-22T20:24:41.000809Z

@chromalchemy n independent DOM nodes, cache is positional

kennytilton 2018-01-22T20:29:52.000656Z

@thedavidmeister’s pitch was irresistible so I took a closer look. I do not get why a plain defn cannot take attributes as a single map:

kennytilton 2018-01-22T20:30:04.000791Z

`(defn my-list
  [& items]
  (ul (map li items)))

kennytilton 2018-01-22T20:30:52.000462Z

That’s ^^^^ from https://github.com/hoplon/hoplon/wiki/Composing-HTML, explaining why defelem is necessary.