You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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: