Closed emiln closed 8 years ago
I wonder if perhaps symbols would be easier for people to relate to for the EDN DSL. The current example in the README is
[:repeatedly [:if [:pointer-near 100 100 50] [:move-to 500 500] [:move-to 100 100]] [:repeat 100 [:click] [:scroll-down 5]] [:when [:pointer-near 500 500 50] [:scroll-up]] [:wait 1000]]
but it could just as easily be
[repeatedly [if [pointer-near 100 100 50] [move-to 500 500] [move-to 100 100]] [repeat 100 [click] [scroll-down 5]] [when [pointer-near 500 500 50] [scroll-up]] [wait 1000]]
or even
(repeatedly (if (pointer-near 100 100 50) (move-to 500 500) (move-to 100 100)) (repeat 100 (click) (scroll-down 5)) (when (pointer-near 500 500 50) (scroll-up)) (wait 1000))
I'd suggest just dispatching on (comp name first), which will allow all of :click, click, and "click" to work. The choice of parentheses is already flexible and allows both styles.
(comp name first)
:click
click
"click"
I wonder if perhaps symbols would be easier for people to relate to for the EDN DSL. The current example in the README is
but it could just as easily be
or even