clojure

Clojure is… weird. It's a lisp that attempts to be immutable,concurrent, opinionated, and pragmatic, geared towards prioritizingpractical, comprehensible application development. The language accomplishesthis by forwarding the idea of different clojure dialects along with theidea that any macros or complex logic should be left to libraries - sothat the programmer just has to glue the library pieces together andworry about the domain of applicaiton.

Libraries

  • hickory: parse html into clojure data structures
  • tongue: i18n
  • sci: builtin clojure interpreter for scripting and DSLs
  • dommy: clojurescript DOM manipulation library
  • medley: useful, pure functions missing from clojure.core
  • datascript: an immutable in-memory database and datalog query engine running in thebrowser
  • rum: client server library for html ui in clojurescript. works as a React wrapper.

Frameworks

Fulcro

Passing functions between front-end and backend is cool, so isconvenient integration with many of the databases - but treating thesite as a monolithic interface from which data can be queried feels sodifferent from React's mindset of avoiding global state and exposing theminimum amount of data necessary for the system to function as a whole.

I really like the shadow-cljs approach and think NodeJS is more fun thanworking with Java on the backend (despite whatever potential performancecaveats may come from that) but it's unclear whether the monolithicquery approach - one that partially but doesn't completely obfuscate thenetwork connection - is net beneficial or just confusing for the enduser.

Reagent

This is much easier to use than Rum, but has caveats: it doesn't haveany mixins and uses its own implementation of atoms rather than fallingback to React's lifecycle/hooks APIs or Clojurescript's. This makes iteasier to use and more of a 'framework' - all of your code happensinside of the Reagent component ecosystem, unlike Rum - but is a bitharder to get creative with and doesn't feel like it's in the spirit ofLisp's easily composable libraries.

Revisions
DateHash
2023-05-26
2023-02-22
Navigation
Previousbooks
Nextjoss
Uppages