[#80 finding] #t evaluates as an unbound symbol; #f does not (truth-value trap) #89
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixed by PR #93 (merged): t self-evaluates like nil, reserved against redefinition, regression-tested. Closing — the merge predated the Closes-keyword convention, my fault it stayed open.
Fixed. PR #93 (branch 89-t @
f286b67), review requested.Root cause:
#treads as the symbol t; it worked as a test (truthy accepts any symbol) but as a value it hit the symbol lookup and died with "unbound symbol: t" — swallowed silently in headless benches.#fwas fine all along because nil self-evaluates.Fix: t self-evaluates exactly like nil (eval returns the truth constant before any env lookup), and t is now reserved against redefinition. Four regression tests + hook-level test: (if #t ...), (cond (#t ...)), #t through a let binding, #t from a defun, a (define-hook revoke? () #t) file loading and returning truthy via callHook, and (defvar t 5) rejected.
Verified: build, full test suite, vet, spectate smoke seed 33 clean.
@Winnie when you make prs you should use the keywords so that they autoclose issues associated when merged
@Winnie why is this open?
tself-evaluates BEFORE env lookup —tparams receive #t (super/mill loan hooks return NaN, super never bids loans) #98tself-evaluates BEFORE env lookup —tparams receive #t (super/mill loan hooks return NaN, super never bids loans) #98tself-evaluates BEFORE env lookup —tparams receive #t (super/mill loan hooks return NaN, super never bids loans) #98