Hacker News new | past | comments | ask | show | jobs | submit login

I think we're talking past each other here. The issue is that the enclosed state of counter is exposed globally and can be accessed without synchronization. I suppose yes one could also reassign counter to a different function (and you'd need to be aware of that) but my point is that you still need some kind of sync if you're calling counter all over the place, just like you would with a global variable



> The issue is that the enclosed state of counter is exposed globally and can be accessed without synchronization.

Maybe throw up a code example? I don't follow what you're getting at.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: