jolt/docs/rfc
Yogthos d21ab77e7e Run core.memoize's test suite on jolt
Shaking out clojure.core.memoize (207 assertions, 0 fail) cleared several
general gaps:

- deref/@ on a deftype or reify implementing clojure.lang.IDeref dispatches to
  its deref method (RetryingDelay / make-derefable).
- deftype mutable fields (^:unsynchronized-mutable / ^:volatile-mutable) are
  read live: a set! within a method is observed by a later read in the same
  invocation, not the entry-time capture. Needed for double-checked locking.
  Immutable fields stay let-bound. Field reads rewrite to (.-field inst) with
  lexical-shadow tracking.
- def metadata values are evaluated, like Clojure: ^{:k (f)} stores (f)'s
  result and ^{:af some-fn} the fn. :tag stays a literal hint.
- try dispatches catch clauses by class in order via the exception supertype
  hierarchy; a non-matching value re-throws, an untyped host condition is caught
  by a RuntimeException/Exception/Throwable clause. Previously the last clause
  won and the class was ignored.
- locking takes a real per-object monitor (recursive Chez mutex) now that
  futures/agents/threads share one heap; it was a no-op.
- supers/ancestors reflect a small modeled JVM interface hierarchy, so
  (ancestors (class f)) yields Runnable/Callable (core.memoize's arg check).
- AssertionError / Error constructors.

JOLT_FEATURES is gone from the docs: it isn't read anywhere on Chez, and the
reader already includes :clj in its default feature set. RFC 0002's
{:jolt :default} design was reverted in the reader; docs now match the code.

Raises the SCI floor 205 -> 210.
2026-06-25 13:23:05 -04:00
..
0001-language-specification.md Docs: Chez-only, drop the Janet-era references and obsolete migration notes 2026-06-22 09:05:35 -04:00
0002-reader-conditional-features.md Run core.memoize's test suite on jolt 2026-06-25 13:23:05 -04:00
0003-transients.md Docs: Chez-only, drop the Janet-era references and obsolete migration notes 2026-06-22 09:05:35 -04:00
0004-type-hints.md Docs: Chez-only, drop the Janet-era references and obsolete migration notes 2026-06-22 09:05:35 -04:00
0005-structural-type-inference.md Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
0006-success-type-checking.md Clean up codebase: rename stdlib layer, strip porting residue, fix tooling 2026-06-22 22:18:00 -04:00
0007-compilation-modes-and-binary-output.md jolt build: compile an app to a standalone binary (Phase 4 stages 1-2) 2026-06-22 23:01:36 -04:00
README.md docs: module map, RFC index, refactor plan (arch-refactor tier 0) 2026-06-23 21:50:58 -04:00

RFCs

Design notes for non-obvious language and compiler decisions. An RFC records why a thing is built the way it is; the code is the source of truth for how.

# Title Status Governs
0001 A Specification for the Clojure Language Draft The conformance target — what "is Clojure" means for jolt.
0002 Reader-Conditional Feature Set Accepted #?(...) feature keys (:jolt, :clj, :default).
0003 Transients Accepted transient/persistent! semantics + the Chez mutable backing.
0004 Type hints + keyword-lookup specialization Accepted ^Type/^:struct hints → the bare-get fast path.
0005 Structural collection-type inference Implemented The :struct/:vec/:set lattice in passes/types.
0006 Success typing (provably-wrong-code detection) Implemented The error-domain checker in passes/types.
0007 Compilation modes + binary output Implemented (doc lags) release/--opt/--dev, --direct-link, --tree-shake.

RFC 0007's own status line still says "Draft, no code yet" — that is stale: direct-linking and tree-shaking shipped (see tools-deps.md and backend_scheme.clj / build.ss). Two compiler features that grew alongside it — IR inlining (passes/inline.clj, under --opt) and numeric fl*/fx* lowering from ^double/^long hints (passes/numeric.clj) — are not yet written up as RFCs; their touch points are in ../MODULES.md.