← back to backlog: veritas

Syntax Ergonomics: Macro-Driven Lazy Evaluation

status

todo

type

task

descriptionCurrently, 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.veritas-360