Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
dinglejungle
· 6y ago · 0 comments
An example of this in the Zig math tests, where it tests calling the same function at both comptime and runtime:
https://github.com/ziglang/zig/blob/33c4ad7f3a79aad5d7ea481a...
Comments
[–]
patrec
6y ago
In common-lisp you could do something equivalent, but you'd have to wrap the definitions you want to be able at both compile and and run time in eval-when.