rewrite-clj

https://github.com/clj-commons/rewrite-clj
lread 2020-12-19T23:11:44.246200Z

Heya @vemv, my https://github.com/lread/rewrite-cljc-playground/tree/lread-ns-kw-map is probably ready for a whirl. My focus was on reworking sexpr, so I’m not sure that I did https://github.com/lread/rewrite-cljc-playground/issues/7#issuecomment-667743070 (but note that I did rename :namespaced? to :auto-resolved? on the keyword node record). I did not update my design notes yet, but did rework https://github.com/lread/rewrite-cljc-playground/blob/lread-ns-kw-map/doc/01-introduction.adoc which walk through some examples. I’m very happy to hear any feedback you might have.

👍 1
vemv 2020-12-20T09:13:31.246400Z

🙌 I might give it a spin tomorrow. Just yesterday I was making sure I could spin a repl + run tests in the project :)

lread 2020-12-20T16:52:37.246600Z

That’d be awesome. Looking forward to learning how you fare!

vemv 2020-12-21T15:21:07.247100Z

Slowly diving into it :) I'm studing a bit the tests. Regarding the use of clojure.test/are, when there's a do or let in are's "expr" argument, it's nice to place a true at tail position. That way, if the test fails, it only does once, instead of twice (inner is clauses + implicit surrounding is clause)

vemv 2020-12-21T15:22:11.247300Z

I also spotted an are with a single is, which is redundant (you can just place = instead of is =)

vemv 2020-12-21T15:26:08.247500Z

Finally, if you are an emacs user you might enjoy running clojure-align over the are forms, so that they become tables. (There's no objective reason why one would favor tables... simply I've seen tables being praised by :rich: et al in various contexts)

lread 2020-12-21T15:38:04.249Z

Awesome tips & observations, thanks!

lread 2020-12-21T15:59:19.249700Z

Looking forward to the next set!