Language record
Clojure
Clojure namespaces are indexed with the reader's own rules: :refer and :as decide what a bare call is allowed to resolve to, a name the namespace declares itself shadows the referred one, and a macro is a function carrying a marker rather than a separate kind.
The registry row this page is generated from
Read at render time from the same family row the register reads, so nothing in this block can disagree with it.
- Extensions
- .clj, .cljs, .cljc, .edn
- Registry names
clojure- Recorded symbols
- namespaces · functions · protocols
Relationship types this analyzer constructs
11 of 14 constructed, read from this analyzer's source and re-derived by the languages gate. Each row below is one of the engine's types, in the engine's own order.
| Relationship type | Constructed |
|---|---|
calls | constructed by this analyzer |
extends | constructed by this analyzer |
implements | constructed by this analyzer |
uses | constructed by this analyzer |
imports | constructed by this analyzer |
exports | constructed by this analyzer |
contains | constructed by this analyzer |
references | constructed by this analyzer |
overrides | constructed by this analyzer |
instantiates | constructed by this analyzer |
decorates | ruled absent |
renders | constructed by this analyzer |
mixes_in | ruled absent |
part_of | ruled absent |
11 constructed, 3 not constructed. All 3 absent types are recorded as ruled absent: the written reason and the corpus measurement behind each are in this family's completeness record. The register explains what each label means.
What this analyzer does not resolve
- A call to clojure.core is suppressed unless this namespace declares or refers that name, and the check is position-aware: a form above (defn map ...) really is the standard library while one below it is the file's own var. The exclusion list holds 723 names.
- recur is a special form that transfers control to the enclosing fn — it names no var and invokes nothing — so it produces no edge, and neither does a call whose name was minted for an anonymous function.
- There is no override edge, and that is a fact about Clojure: a defmethod introduces a var sharing a name with the multimethod rather than replacing a member of anything, so there is no override to record.
Every line above was written against Clojure’s own analyzer module and is named against a construct in it, so it can be checked against the source. Nothing here is inherited from a template, or from another language’s page.
Where you meet it in a repository
Recognised by extension — .clj, .cljs, .cljc, .edn. Everything below is about where those files actually sit in a working repository.
- A Clojure codebase is one file per namespace, and the :require form at the top is the only statement that says where anything came from.
- Protocols are usually defined next to the functions they dispatch on, while the implementations live wherever the concrete type does.
- Test namespaces use deftest, which bb records as a function, so test bodies are indexed alongside the code they exercise.
Questions this index answers
Phrased as retrievals, because that is what an index can honestly do: it holds the symbols and the edges between them, and hands them back with the evidence attached.
- Which namespaces require this library?
- Which names does this namespace refer from another one?
- Which records implement this protocol?
- Which functions does this namespace declare, macros included?
What the analyzer sees in code like this
(ns myapp.cart
(:require [myapp.account :as acct]))
(defrecord Cart [id total]) ; bb records: type Cart · fields id, total
(defn place [cart user] ; bb records: function place
(acct/charge! user (:total cart))) ; bb records: a call through the aliasSymbols are stored with the file they came from and the bytes they span, so a hit points at a line rather than at a guess. The annotations in the sample are commentary for the reader, not strings the index would store.
Languages that turn up in the same repository
Functional & declarative — the count beside each name is how many relationship types that family’s analyzer constructs.
The extensions, registry names, recorded symbols and relationship types above are the parser registry row for Clojure, read while the page rendered — the same row the register reads, so the two surfaces cannot tell two stories. Every relationship type listed as constructed appears in src/ast/real-*, the analyzer modules bb ships. bb 0.1.0 answers from a local store over 50 languages (53 registry ids, three of them aliases). There is no benchmark on this page: every claim here is one you can go and read in the source.