64 ms·
I'm curious too. Conceptually, `let` defines a function of n variables and then invokes it on a list of n values: (let ((a 3) (b 5) (c
by thaumasiotes 9y ago
I'm curious too. Conceptually, `let` defines a function of n variables and then invokes it on a list of n values:
(let ((a 3)
(b 5)
(c -1))
(* a (+ b c)))
def «gensym»(a,b,c):
return (a * (b + c))
«the-gensym»(3,5,-1)
It seems workable purely in terms of the code transformation. But, I haven't tried.
- Tenobrus 9y agoI think the problem is, then constructs such as yield (the behavior of which depends on the current function scope), would no longer work correctly.
- nerdponx 9y agoCouldn't `let` be a compile-time expansion using `gensym` or some other symbol mangling? Or is that what the contrib macro does?