4 ms·
I agree that removing ‘let’ makes the language much less pleasing for me to use. I recently looked in contrib for ‘let’ and saw the macro definitions but could
by mark_l_watson 7y ago
I agree that removing ‘let’ makes the language much less pleasing for me to use. I recently looked in contrib for ‘let’ and saw the macro definitions but could not get it working. It seems like a small thing, but it does keep me from doing more than rare experiments with Hy.
- rcarmo 7y agoDitto. I moved away from it partially due to the removal of let and partially due to lack of Python 3/async support (which is now landing). I’d really like to see a 1.0 with let back in the core, but I don’t see that happening just yet. Edit: typos, plus I’m also curious to see what https://github.com/gilch/hissp https://github.com/gilch/hissp will do.
- nerdponx 7y agoCurious what problems you had with let. I tried it recently and it worked fine. Having an import is annoying but it's not the end of the world.
- rcarmo 7y agoIt was removed without the replacement macro being fully baked, and a number of other things were changed at the same time. Rather than rewrite my stuff at every minor release, I moved on.
- nerdponx 7y agoThat's what I'm asking. What's not fully baked about it? In my (admittedly small) testing, it does its job of assigning stuff in a temporary scope.
- reikonomusha 7y agoI haven’t tried, but are the variables properly captured in closures? LET should have “temporary” lexical scope, not “temporary” temporal/dynamic scope.
- gilch 7y agoIt does at least act like it has closures. Try starting the REPL with $ hy --spy and you can see how examples get compiled.
- rcarmo 7y agoAt the time, it just wasn’t there :) Nowadays it seems to work, but rewriting my code to catch up with today’s version (and cope with the other changes introduced over the last couple of years) is not something I’m interested in doing.
- cutler 7y agoNot a small thing really. To anyone who groks Lisp a dysfunctional let is a non-starter.