unbinding let #2193
allison-casey
started this conversation in
Show and tell
unbinding let
#2193
Replies: 1 comment
-
This is a very stupid question, but if I am using let in a defmacro, will the let bindings all be out of scope and be eligible for GC after the macro call? Or do I still have to manually del them or use the macro above? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
let
is now natively in Hy!Native
let
(like thelet
of old) doesn't garbage collect let bound names after you exit scope, but the macro to do so ended up just kinda working as you'd expect now that let just assigns to gensym names instead of a dictionary.All hail native
let
!note though that deleting bindings like this will break closures in the same way
deleting any vars used in a closure would in python 🤷♀️
Make sure to thank @scauligi for all their hard work getting
let
into Hy ❤️Beta Was this translation helpful? Give feedback.
All reactions