← Tue, Dec 1 digest

Chez from a Clojurian perspective

read article ↗ hn thread ↗

A Clojure developer reflects on building a rich text editor in Chez Scheme over one year, weighing its fast startup and powerful macros against missing data literals and cumbersome interactive workflows.

read it The author shares hard-won practical insights from building a real application in Chez Scheme, offering rare architectural comparisons against Clojure.

summary

A developer with a Clojure background spent a year building a rich text editor in Chez Scheme to escape slow startup times and learn advanced features. They found Chez's macros, C FFI, and performance excellent for desktop apps, but missed Clojure's data literals, generic polymorphism, and seamless interactive development. Ultimately, while Chez delivers on performance and binary size, the lack of modern conveniences makes Racket a more pragmatic choice for future Scheme projects.

key points

  1. Chez Scheme lacks built-in literal syntax for maps, sets, and vectors, requiring explicit constructors and quoting.
  2. The language's module immutability hinders the live-reloading interactive workflow common in Clojure and Python.
  3. Chez's robust C FFI enables seamless integration with native libraries like GTK for desktop application development.

who should read it

Lisp and Clojure developers evaluating alternative Lisps for desktop or resource-constrained applications.

discussion positive

consensus

Commenters validate the author's architectural frustrations with Chez while highlighting alternatives like Racket, Guile, and new experimental projects like Jolt that run Clojure on Chez.

pushback

Some point out that Scheme does have standard vector syntax and that Common Lisp or alternative dialects might have been a better fit for the author's needs.

best comment by pushpankar ↗

Environments are top level things that can store functions and other defintions. These can be mutable. The other side of this is continuation. A continuation is invocable multiple times in scheme.

Lets say you want to debug a function.

```

(define (f1 arg1 arg2)

;; body calls f2 and others

)

```

Now you can capture the continuation just before the body of the f1. Then, you can use chez's eval-in-continuation to evaluate the updated body of the function. Once you are satisfied, you can continue the continuation with output. If there is problem in f2, you can update f2 and retry from f1 …

The author elaborates on how Chez's top-level mutable environments combined with continuations could theoretically surpass Clojure's interactivity.

Generated by an LLM from the article and thread. Check the sources before relying on it.