Targeting Clojure & ClojureScript from a Single Codebase
summary
cljx implements feature expressions to transform a single .cljx codebase into platform-specific Clojure and ClojureScript sources, preserving line/column info so stack traces map to original files. It integrates with Leiningen and provides nREPL integration to load cljx files on the fly, produces ordinary .clj/.cljs outputs, and is used by libraries like prismatic schema and DoubleCheck for a seedable RNG example. Limitations: no automatic portable macros and annotations can clutter code.
AI-written summary · about
chapters (7)
- 0:00Start
- 0:50Targeting Closure and Closure Script from a Single Code Base
- 7:08Material Differences between Closure and Closure Script
- 13:19C Preprocessor
- 15:09Feature Expressions
- 32:11Shortcomings
- 35:40Resources
related talks
35mThe evolution of the Emacs tooling for Clojure
55mClojure and ClojureScript Update
21mLLMs + Clojure = Who needs frameworks?
35m"Clojure lsp – One tool to lint them all"
43mClojure - Modern Lisp
41mClojureScript for Skeptics
36mKlor: Choreographic Programming in Clojure
24mUsing backend languages for frontends: Why ClojureScript is an awesome idea!
