README: trim differences to actual differences
The list led with parity (numeric tower, persistent collections, future/agent/ pmap, core.async) framed as divergences. Keep the four real ones — no JVM/Java interop, no BigDecimal, no STM, the irregex engine — plus the coverage caveat, and state the parity as parity.
This commit is contained in:
parent
f66925d3a8
commit
35a854eca1
1 changed files with 27 additions and 26 deletions
53
README.md
53
README.md
|
|
@ -66,33 +66,34 @@ reproduces the checked-in seed byte-for-byte).
|
||||||
|
|
||||||
## Differences from Clojure
|
## Differences from Clojure
|
||||||
|
|
||||||
Jolt targets Clojure semantics but runs on Chez, not the JVM.
|
Jolt targets Clojure semantics but runs on Chez, not the JVM. Most portable
|
||||||
|
Clojure runs unchanged — persistent collections (32-way-trie vectors, HAMT
|
||||||
|
maps/sets), the numeric tower (exact integers, bignums, ratios, doubles), lazy
|
||||||
|
and infinite sequences, transducers, destructuring, multimethods with
|
||||||
|
hierarchies, protocols/records (`deftype`/`defrecord`/`reify`/`extend-protocol`),
|
||||||
|
metadata, namespaces, atoms, `future`/`promise`/`agent`/`pmap`,
|
||||||
|
`clojure.core.async`, runtime `eval`/`load-string`/`defmacro`, and the full
|
||||||
|
reader (`#()`, `#_`, `#?`, tagged literals, `#"…"`) all behave as on the JVM.
|
||||||
|
`=` is category-aware (`(= 3 3.0)` ⇒ `false`) and `==` is value-equality, as in
|
||||||
|
Clojure. The genuine divergences:
|
||||||
|
|
||||||
- **Host platform.** No JVM, no reflection, no `gen-class`/`proxy` of Java
|
- **No JVM, no Java interop.** No reflection, no `gen-class`/`proxy`. Interop
|
||||||
classes. Interop syntax (`Class.`, `Class/static`, `.method`) works against a
|
syntax (`Class.`, `Class/static`, `.method`) resolves only against a shimmed
|
||||||
shimmed subset of the `java.*` standard library, and a class token resolves to
|
subset of the `java.*` standard library; a class token is a name, not a loaded
|
||||||
a name. See [docs/host-interop.md](docs/host-interop.md) for what's covered and
|
class. See [docs/host-interop.md](docs/host-interop.md). To call C libraries
|
||||||
how to register your own host classes from a library.
|
directly, use the `jolt.ffi` foreign-function interface (how the db and
|
||||||
- **Numbers.** The full Scheme numeric tower, matching the JVM: exact integers and
|
http-client libraries bind SQLite/libpq and sockets/OpenSSL/zlib).
|
||||||
bignums, exact ratios (`(/ 1 2)` ⇒ `1/2`), and flonum doubles. `=` is
|
- **No `BigDecimal`.** `decimal?` is always false and there is no `M` literal;
|
||||||
category-aware (`(= 3 3.0)` ⇒ `false`); `==` is value-equality (`(== 3 3.0)` ⇒
|
the rest of the numeric tower matches the JVM.
|
||||||
`true`). `integer?`/`int?` are exact integers, `float?`/`double?` are flonums,
|
- **No STM.** No `ref`/`dosync`/`alter`/`commute` — coordinated shared state uses
|
||||||
`ratio?` is an exact non-integer. No `BigDecimal` (`decimal?` is always false).
|
atoms (per-atom mutex, JVM-style CAS). The concurrency primitives above are
|
||||||
- **Concurrency.** `future`/`promise`/`agent`/`pmap` run on real OS threads over a
|
otherwise present and run on a shared heap.
|
||||||
**shared heap**, matching JVM semantics (not isolated-heap snapshots). Atoms use a
|
- **Regex engine.** Patterns compile through
|
||||||
per-atom mutex with JVM-style CAS. `clojure.core.async` provides blocking channels
|
[irregex](https://github.com/ashinn/irregex) (vendored), not
|
||||||
and `go`/`<!`/`>!`/`alts!`/`timeout`.
|
`java.util.regex`; common patterns work, Java-specific features can differ.
|
||||||
- **Regex.** Backed by [irregex](https://github.com/ashinn/irregex) (vendored),
|
- **Coverage.** `clojure.core` is implemented function by function against the
|
||||||
PCRE/Java-style patterns.
|
JVM-sourced conformance corpus — broad but not total; a namespace can load with
|
||||||
- **Collections.** Immutable persistent vectors, cons lists, and HAMT maps/sets.
|
most functions working and a few not yet implemented.
|
||||||
Hash-map/hash-set iteration order is unspecified — use `sorted-map`/`sorted-set`
|
|
||||||
when order matters. Transients are real mutable scratch collections.
|
|
||||||
|
|
||||||
Supported and Clojure-compatible: lazy/infinite sequences, transducers,
|
|
||||||
destructuring, multimethods with hierarchies, protocols/records
|
|
||||||
(`deftype`/`defrecord`/`reify`/`extend-protocol`), metadata, namespaces, runtime
|
|
||||||
`eval`/`load-string`/`defmacro`, and the reader (`#()`, `#_`, `#?`, tagged literals,
|
|
||||||
`#"…"`).
|
|
||||||
|
|
||||||
## Test
|
## Test
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue