3 ms·
Is there something about Hy's lambda that makes implementing let with it not possible? For those unaware, the transformation is roughly: (let ((foo bar) ...
by aidenn0 9y ago
Is there something about Hy's lambda that makes implementing let with it not possible?
For those unaware, the transformation is roughly:
(let ((foo bar) ...) Y) -> ((lambda (foo ...) Y) bar ...)
[edit]
Reading around it seems that it breaks several pythonic control-transfer functions that treat functions specially (e.g. yield from inside a let would be surprising).
Without knowing much about Hy's semantics, it should still be doable by rewriting variable names. That's likely not doable in a robust manner via a macro though, so would have to be part of Hy's transformation from sexpr to ASTs.