News for hackers. Stuff that matters.
Re:John Carmack on Inlined Code by zelphirkalt on Wednesday October 09, 2024 @07:00AM (#41786471)
Where is the part, where this is "careful"? This is just how scopes work. I don't see what is special about the inner functions using things in the scope of the outer functions.
Re:John Carmack on Inlined Code by int_19h on Wednesday October 09, 2024 @07:20PM (#41793878)
Excessive use of external bindings in a closure can make it hard to reason about lifetimes in cases where that matters (e.g. when you find out that a huge object graph is alive solely because some callback somewhere is a lambda that closed over one of the objects in said graph).