The Further Adventures of Starting a new ClojureScript project in 2022

I have a branch of cherry here which emits “direct” JS without the immutable stuff.

What I’ve done:

  • keywords are mapped to strings
  • map notation maps directly to js objects
  • vector notation maps directly to js arrays
  • assoc! and dissoc! map to in-place mutation of js objects
  • keys destructuring works (emits more boilerplate than needed, could emit spread operator directly)

Demo in this tweet

Examples:

The code could be more optimized by inlining assoc! and dissoc! behavior which can be accomplished by making those macros.

I’d be happy to pursue this further if it seems promising enough :slight_smile:

Edit: I now published this to NPM: cherry-cljs@0.0.0-mutable-alpha.53