Syntax Ergonomics: Macro-Driven Lazy Evaluation
veritas-360Currently, if a user wants to delay evaluation of the #:got argument, they have to use quasiquoting and a specific list structure:
Scheme
#:got `(comp (begin (sleep 4) (+ 10 9)))
While this works, it requires the user to remember quotes and exposes the underlying implementation.
The Improvement: Introduce an implicit macro layer or leverage Scheme native promises (delay and force).
How it looks: You could write macros for assertions that automatically capture #:got as a thunk if wrapped in a custom keyword, or simply support native promises:
Scheme
(assert-equal #:expect 144
#:got (delay (let ((x 12)) (* x x))))
Alternatively, write a macro wrapper so users can just type (lazy-assert-equal ...) or pass an unquoted (comp ...) block that a macro intercepts before evaluation.
plan (0)
time logged (0)
no time logged yet
discussion (0)
no comments yet
attachments (0)
no attachments yet
activity (1)
versions (1)
v1 — 2026-11-05 14:28 — Joe
Currently, if a user wants to delay evaluation of the #:got argument, they have to use quasiquoting and a specific list structure:
Scheme
#:got `(comp (begin (sleep 4) (+ 10 9)))
While this works, it requires the user to remember quotes and exposes the underlying implementation.
The Improvement: Introduce an implicit macro layer or leverage Scheme native promises (delay and force).
How it looks: You could write macros for assertions that automatically capture #:got as a thunk if wrapped in a custom keyword, or simply support native promises:
Scheme
(assert-equal #:expect 144
#:got (delay (let ((x 12)) (* x x))))
Alternatively, write a macro wrapper so users can just type (lazy-assert-equal ...) or pass an unquoted (comp ...) block that a macro intercepts before evaluation.
