-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Function closures supported? #20
Comments
Well this is certainly an interesting question! I read through the MDN's explanation of closures, and some of the examples. I have to say my gut is telling me that Sack's rules on scope make these impossible currently (https://github.com/RandomSoup/sack/tree/1.0.0?tab=readme-ov-file#scope), and porting some of the examples over to Burlap, the reference implementation of Sack indeed did error on the definition of a functi inside of another functi. However, closures definitely seem very powerful, especially when paired with the lack of classes. If you have any ideas for how they could work, please do feel free to suggest them! |
I am wondering if there is any chance we can use function closures here, like JavaScript does, and what is the formal way to do it?
The text was updated successfully, but these errors were encountered: