News for hackers. Stuff that matters.
Re:Why Hy? by vaylian on Tuesday May 03, 2022 @10:52AM (#31249094)
> In truth, I've never understood the fuss about `let`. It's taken a huge amount of Hy development effort, but it adds very little

My use case is Jupyter notebooks. With normal Python scoping you quickly accumulate a lot of global variables and you might accidentally use the wrong one. With let-bindings you have variables that clean up after themselves.

Re:Why Hy? by Kodiologist on Tuesday May 03, 2022 @10:59AM (#31249177)
I'm not familiar with Jupyter internals, but I think functions would work well for this. Hy allows multi-statement anonymous functions, and you can do stuff like `((fn [] … ))` to define and immediately call the function. One advantage of this over `let` is that it allows old locals to be garbage-collected. If memory isn't an issue, though, `let` should work well.