ClojureScript
summary
Deep dive into ClojureScript internals: vectors are JS arrays with copy-on-write semantics, maps use obj-map vs. hashmap depending on key types, and sets sit on maps; protocols back the collection APIs so existing goog.Map instances can be extended without wrappers via extend-type, implemented by macros that run on the JVM because the compiler is written in Clojure; showed REPL-based examples, browser/Rhino targets, and that adding symbol-macros in ~5–6 lines of compiler code immediately works (example evaluates to 15).
AI-written summary · about
chapters (10)
- 0:00Intro
- 1:40Closure
- 3:03Overview
- 4:33Data Types
- 22:41Macros
- 23:22eval
- 24:36macro expand
- 31:21compiler
- 31:46Symbol macro
- 38:46Summary
related talks
34mClojureScript: The Essence of Alchemy
35mWhat Lies Beneath - A Deep Dive Into Clojure's Data Structures
27mBuilding functional Front-ends with ClojureScript
32mClojureScript: Lisp's Revenge
36mRelevance of ClojureScript
34mHash Maps: more room at the bottom
18mClojureScript Has It All! Except Maybe for Types
26mImmutability, interactivity & JavaScript
