Documenting when the closure "bug" (#15276) binds, and how to avoid it for introductory users

I don’t want to talk about this bug at all. I want to give people patterns for code that are likely to avoid it. Basically: I want to avoid teaching people about optimization and performance tweaking by giving them patterns in the code to copy where those things are likely to be avoided.

I still have no idea when the issue occurs… Can anyone tell me? Does it generally only happens when you return a closure from another function, then that is an easy programming pattern to avoid (and not something common for simple user code).

1 Like