Perhaps this previous Internals & Design thread would be helpful for folks that want to dig in deeper as to why and how this occurs:
In short, it is a predictable syntactic transform (albeit with complicated rules). You don’t need any types or previous definitions (beyond macros) to see if it’ll occur. Just check Meta.@lower
for Box
es. I’d love to find some time to spend with linting — this is highly lintable and could be flagged by an editor.
IMO: Closures can be a challenging topic to teach. Focus on the behavior first. This performance snag is just going to further confuse things unless you’re very careful.