Re: Make derive-check procedure-oriented and not expression-oriented
Artyom Bologov 14 Jun 2026 21:46 UTC
Peter,
> I think a better version of `derive-check` would be to take and return
> values, instead of expressions as datums. This would allow a simpler
> runtime implementation if the value is dynamic, and would also allow a
> compiler that infers types of expression to replace `derive-check`
> invocations with that type.
I opted for returning quoted expressions in derive-check to
• make its result easier to manipulate programmatically
• expose part of implementation type checker to the programmer
• preserve read/write invariance
• make it easier to implement: just a cond returning symbols in the
simplest case.
I’m not sure derive-check should be optimizable / smart in any way, as
this would defeat at least some of these.
> It gets rid of previous
> scoping/envrionment issues and effects more obvious.
I don’t see how environment becomes irrelevant here. Care to expand?
Thanks,
--
Artyom Bologov
https://aartaka.me